On Wednesday, March 22, 2017 at 8:20:01 AM UTC+8, Ingo Oeser wrote: > > Hi all, > > I wrote a small package which implements atomic operations on types. > This is more comfortable to use and enabled building an atomic boolean > type (which has been the motivation) here. > > Documentation at https://godoc.org/github.com/nightlyone/atomic > Source code at: https://github.com/nightlyone/atomic > License: BSD-3-Clause (same as the Go project) > > NOTES on explicit omissions: > * no support for unsafe.Pointer, because I want it to be useful in > appengine (where unsafe is forbidden) > * no support for uintptr to discourage dangerous patterns involving > pointers > * no support for SwapXXX, since one usually should use CompareAndSwap > instead to make sure the atomic value is in the expected state before > changing it > (the go runtime avoids it too, probably for the same reason) > > Feedback is very welcome. > > Enjoy! > > Ingo >
not safe in 32-bit OS: https://golang.org/pkg/sync/atomic/#pkg-note-BUG -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
