WorkerDebugger.initialize_waiting_worker.js (377B)
1 "use strict"; 2 3 // SharedArrayBuffer isn't available... 4 const { buffer } = new WebAssembly.Memory({ 5 shared: true, 6 initial: 1, 7 maximum: 1, 8 }); 9 const int32 = new Int32Array(buffer); 10 11 postMessage("worker initialized"); 12 13 // This should block the worker thread synchronously 14 console.log("Calling Atomics.wait"); 15 Atomics.wait(int32, 0, 0); 16 console.log("Atomics.wait returned");