Commit Graph

22 Commits

Author SHA1 Message Date
Tevin Zhang b5c1b6e635
Reduce exit point 2021-05-15 19:31:34 +08:00
Tevin Zhang 85c50599ef
Polish comments 2021-05-15 19:31:02 +08:00
Lucas Rouckhout e91174bed9 Formatting 2021-05-04 19:29:53 +02:00
Lucas Rouckhout 3487d45a26 Adjust JSON unmarshalling to inherit from a bool instead of using a blank interface. 2021-05-04 19:26:17 +02:00
Lucas Rouckhout 9a297a52be Implement the Unmarshaler and Marshaler interfaces.
This allows an AtomicBool to be Unmarshalled from the JSON
representation of a normal boolean and respectively marshall
it into the JSON representation of normal booleans.

This makes it easier to use AtomicBool in structs. For they can
now be read from JSON files and serialized back into them.
2021-04-28 16:48:48 +02:00
Tevin Zhang 8ae5c93531
Add IsNotSet() 2020-07-16 14:46:58 +08:00
Tevin Zhang 3a33536c80
Refine comments 2020-07-16 14:07:17 +08:00
Tevin Zhang 53396ec6fe
Change return type of Toggle to simple bool 2020-07-07 15:33:59 +08:00
Tevin Zhang 4bc34b54a1
Complete the implementation of toggle 2020-06-30 10:10:19 +08:00
barryz 9e538c6d38 implments Toggle method more explicit and simple. 2019-07-23 23:43:34 +08:00
barryz 774dbeaec2 fixing readme 2019-07-22 13:11:38 +08:00
barryz 42463bd9a0 atomically negates boolean value with Toggle method 2019-07-22 13:04:35 +08:00
barryz a8aae64969 Refine flip method, may be not atomic yet 2018-09-08 20:31:55 +08:00
Tevin 0bc71b68c3
Refine comments 2018-09-08 12:35:14 +08:00
barryz ae078ebcf7 Add Flip method to flip boolean value 2018-09-07 22:17:26 +08:00
Tevin Zhang 6662858d93 Refine comments 2016-06-02 11:50:26 +08:00
Tevin Zhang df1d8a392d Add CAS methods 2016-06-02 11:49:33 +08:00
Tevin Zhang 3bdfbdf06a Refine package description 2016-06-01 18:38:57 +08:00
Tevin Zhang bb33e2abb1 Add NewBool 2016-05-25 15:06:49 +08:00
Tevin Zhang 6e6b80cf11 Add race test 2016-05-25 14:57:10 +08:00
Tevin Zhang eedf32b55b Add package description 2016-05-25 14:08:20 +08:00
Tevin Zhang b6b9ab38df First commit 2016-05-25 13:56:52 +08:00