Re:Data Race Patterns in Go
by bumper_crop on Monday June 20, 2022 @09:06PM
(#31818489)
Make sure to read between the lines. It only looks like a busy loop. Remember, the OS can pause and preempt your thread at any time. This is a real and likely event.
Where does this go to sleep: https://cs.opensource.google/go/go/+/refs/tags/go1.18.3:src/...
It looks like a CAS busy loop with preemption disabled, to me.