// Create a SharedArrayBuffer with a size in bytes
const sab = new SharedArrayBuffer(1024);
const int32 = new Int32Array(sab);Atomics.waitAsync() / notebook
Atomics.waitAsync()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const result = Atomics.waitAsync(int32, 0, 0, 1000);
// { async: true, value: Promise {<pending>} }Atomics.notify(int32, 0);
// { async: true, value: Promise {<fulfilled>: 'ok'} }