Complete the implementation of toggle

This commit is contained in:
Tevin Zhang 2020-06-30 10:10:19 +08:00
parent 9c19061983
commit 4bc34b54a1
No known key found for this signature in database
GPG Key ID: EE7DA2A50F0960FB
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ func (ab *AtomicBool) UnSet() {
// IsSet returns whether the Boolean is true
func (ab *AtomicBool) IsSet() bool {
return atomic.LoadInt32((*int32)(ab)) == 1
return atomic.LoadInt32((*int32)(ab))&1 == 1
}
// SetTo sets the boolean with given Boolean.