forked from mirror/abool
Update usage
This commit is contained in:
parent
d174386fab
commit
8ad37317dc
|
@ -17,9 +17,9 @@ cond := abool.New() // default to false
|
||||||
cond.Set() // Set to true
|
cond.Set() // Set to true
|
||||||
cond.IsSet() // Returns true
|
cond.IsSet() // Returns true
|
||||||
cond.UnSet() // Set to false
|
cond.UnSet() // Set to false
|
||||||
cond.SetTo(true) // Set to whatever you want
|
cond.SetTo(any) // Set to whatever you want
|
||||||
cond.SetToIf(false, true) // Set to true if it is false, returns false(not set)
|
cond.SetToIf(new, old) // Sets to `new` only if the Boolean matches the `old`, returns whether succeeded
|
||||||
cond.Toggle() *AtomicBool // Negates boolean atomically and returns a new AtomicBool object which holds previous boolean value.
|
cond.Toggle() // Inverts the boolean then returns the value before inverting
|
||||||
|
|
||||||
|
|
||||||
// embedding
|
// embedding
|
||||||
|
|
Loading…
Reference in New Issue