Re: [go-nuts] Overflow behavior guarantees for atomic.Add*

2016-10-03 Thread 'Axel Wagner' via golang-nuts
According to the godoc : The add operation, implemented by the AddT functions, is the atomic > equivalent of: > >> *addr += delta >> return *addr > > which provides a guarantee of the correct overflow behavior. On Mon, Oct 3, 2016 at 5:45 PM, Caleb Spare wrote: >

Re: [go-nuts] Overflow behavior guarantees for atomic.Add*

2016-10-03 Thread Caleb Spare
> I'm familiar with (and greatly appreciate!) the guarantees regarding > overflow for ordinary integer arithmetic in the Go spec Which guarantees? > but I've been > unable to locate anything that reassures me that similar guarantees apply > for the sync/atomic.Add* functions. Is there any officia

[go-nuts] Overflow behavior guarantees for atomic.Add*

2016-10-02 Thread Nicholas Knight
I'm familiar with (and greatly appreciate!) the guarantees regarding overflow for ordinary integer arithmetic in the Go spec, but I've been unable to locate anything that reassures me that similar guarantees apply for the sync/atomic.Add* functions. Is there any official statement anywhere on