Re: [go-nuts] Re: A question about the atomic operations in golang

2017-01-09 Thread 'Axel Wagner' via golang-nuts
The only guarantees made in regards to alignment are the ones outlined here: https://golang.org/ref/spec#Size_and_alignment_guarantees >From what I can tell, there is no such guarantee. But why do you care, specifically? Using the sync/atomic package will handle this correctly in every case. This r

Re: [go-nuts] Re: A question about the atomic operations in golang

2017-01-09 Thread 'Axel Wagner' via golang-nuts
The answer (like with virtually all questions like this on golang-nuts) is: Possibly, but you can not rely on it. Assuming that it is might break your program now or at a non-specific future date or on a non-specific current or future processor. If you need atomic operations, please use the sync/a