Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScriptSharedArrayBuffer and AtomicsSingle-choice MCQ

Without Atomics, a plain write to a SharedArrayBuffer view in one agent and a plain read in another can observe surprising values. What guarantee do `Atomics` operations add that plain accesses lack in the JS memory model?

// Agent A: // Atomics.store(ia, 0, 1); // Agent B: // const seen = Atomics.load(ia, 0);