From 0bc71b68c32ac9852043fd1123baff450b04b5b1 Mon Sep 17 00:00:00 2001 From: Tevin Date: Sat, 8 Sep 2018 12:35:14 +0800 Subject: [PATCH] Refine comments --- bool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bool.go b/bool.go index 7c8d194..e9e20fa 100644 --- a/bool.go +++ b/bool.go @@ -40,7 +40,7 @@ func (ab *AtomicBool) IsSet() bool { return atomic.LoadInt32((*int32)(ab)) == 1 } -// SetTo sets the boolean with given Boolean +// SetTo sets the Boolean with given Boolean. func (ab *AtomicBool) SetTo(yes bool) { if yes { atomic.StoreInt32((*int32)(ab), 1) @@ -49,7 +49,7 @@ func (ab *AtomicBool) SetTo(yes bool) { } } -// Flip flips the boolean value whether the value is set or not +// Flip toggles the Boolean (replaces with its opposite value). func (ab *AtomicBool) Flip() { atomic.StoreInt32((*int32)(ab), atomic.LoadInt32((*int32)(ab))^1) }