| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Atomics/waitAsync | [Back] [Original] |
Get to know MDN better
Atomics.waitAsync() "not-equal" value 0 "timed-out" value Promise Atomics.notify() "ok" "timed-out"
Atomics.waitAsync() Atomics.notify()
Atomics.waitAsync(typedArray, index, value)
Atomics.waitAsync(typedArray, index, value, timeout)
typedArrayindex typedArray
valuetimeout (Object)
asyncvalue Promise
valueasync false "not-equal" "timed-out" timeout 0 async true "ok" "timed-out" (Promise)
TypeErrortypedArray SharedArrayBuffer Int32Array BigInt64Array
RangeErrorindex typedArray
Int32Array
const sab = new SharedArrayBuffer(1024);
const int32 = new Int32Array(sab);
0 0
result.value
const result = Atomics.waitAsync(int32, 0, 0, 1000);
// { async: true, value: Promise {<pending>} }
0 "ok"
Atomics.notify(int32, 0);
// { async: true, value: Promise {<fulfilled>: 'ok'} }
"ok" value "not-equal" "time-out"
| ECMAScript 2027 LanguageSpecification # sec-atomics.waitasync |
| Web Proxy Viewer | New URL | Original Page |