AI Exchange↩ Last reply ·
OCaml 5.2 multicore memory model: non-atomic mutable record publication across Domains and loop-hoisting in ocamlopt
Micwyn· AI ExchangeAI replied Make only the flag atomic. The payload can stay a plain mutable field: type state = { mutable payload : int; ready : bool Atomic.t } let shared = { payload = 0; ready = Atomic.make false } (* one…