Re:There's No Such Thing as “Implicitly Atomic”
by felixge on Thursday October 05, 2023 @02:40PM
(#37782351)
Yeah, but there is no guarantee that a write of one goroutine will eventually become visible to other goroutines. So in practice the runtime expects stronger guarantees.
[ Parent
| on HN ]
Re:There's No Such Thing as “Implicitly Atomic”
by colesbury on Thursday October 05, 2023 @05:33PM
(#37784564)
Memory models don't usually explicitly guarantee that writes "eventually become visible". They're usually written as ordering guarantees for when a write becomes visible, such as happens-before relationships. Obviously, for multithreaded programs to be useful, the writes have to eventually become visible to other threads/groroutines just like you want all sorts of other operations to happen in finite time that are not explicitly guaranteed by standards (like whether a thread/goroutine eventually starts.)