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

`Atomics.wait` is called on an Int32Array view of a SharedArrayBuffer. What is the spec's hard restriction on which agents may call it, and why does it exist?

const sab = new SharedArrayBuffer(4); const ia = new Int32Array(sab); // called on the browser main thread const r = Atomics.wait(ia, 0, 0, 100);