Commit Graph

9 Commits

Author SHA1 Message Date
Nathan Jordan
1ea20fb1cb add atomic duration type (#37)
wrapper around existing `Int64` type for atomic operations on `time.Duration` values
2018-05-01 10:38:09 -07:00
Prashant Varanasi
3f020e6d5d Add Bool.CAS for compare-and-swap semantics (#23) 2017-05-09 12:57:10 -07:00
bill fumerola
4e336646b2 Shadow atomic.Value from sync/atomic (#19) 2017-04-10 19:30:53 -07:00
Anton Tyurin
3b8db5e93c Implement Add/Sub for Float64 (#17)
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2016-12-15 11:56:52 -08:00
Kunal Thakar
6c2817a9ef Atomic wrapper around float64 (#12) 2016-10-19 17:45:26 -07:00
Prashant Varanasi
e59e67d981 Use unexported field name instead of embedding
Unexported field name means the methods on different types look
more similar (e.g., &i.v instead of &i.int32 or &i.uint32).

For String, this is important since we don't want users to be
able to access the underlying atomic.Value
2016-07-18 12:50:08 -07:00
Akshay Shah
7afff28c37 Add an atomic Boolean type (#4)
* Add an atomic Boolean type

Fixes #2.

* Feedback from CR

- Rename Swap to Toggle
- Add a more Swap-like Swap

* Add boolToInt helper
2016-05-30 11:10:24 -07:00
Akshay Shah
2051a605b9 Add a Sub method to atomics (#5)
* Add a Sub method to atomics

Fixes #3.

* Invert integer sign without multiplying
2016-05-28 22:54:33 -07:00
Prashant Varanasi
928a9d776b Import atomic package
The code is the same as github.com/uber/tchannel-go/atomic
2016-05-25 11:04:20 -07:00