Based on my reading of the Go memory model, this algorithm sketch is
memory-race free. However, there is a race condition. Here's the reason:
The writer issues a synchronized-write to array pointer, and another
synchronized-write to the array len. A reader issues a synchronized read.
the
Hi!
I would like to receive clarifications, if possible, on Go memory model
guarantees about non-atomic load and stores when intermixed with atomic load
and stores.
I'm reviewing a piece of code which, simplified, works as follows:
- There is a single "writer" goroutine which
- Allocates