News for hackers. Stuff that matters.
Re:Data Race Patterns in Go by yencabulator on Saturday June 11, 2022 @02:59PM (#31707157)
> If the Store() caller goes to sleep between setting the type and storing the pointer, it causes every Goroutine that calls Load() to block.

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.

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.
Re:Data Race Patterns in Go by mbnull on Saturday July 02, 2022 @06:59AM (#31957938)
By reading the lines and not between them, you could read these two lines: runtime_procPin() and runtime_procUnpin(). With explicit comments that these pause preemption.