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

On the main thread of a Node.js process, calling `Atomics.wait(i32, 0, 0)` behaves differently than in a worker. What is the actual behavior on the main thread?

const i32 = new Int32Array(new SharedArrayBuffer(4)); Atomics.wait(i32, 0, 0); // on the MAIN thread