pub fn wait(
typed_array: &Int32Array,
index: u32,
value: i32,
) -> Result<JsString, JsValue>
Expand description
The static Atomics.wait()
method verifies that a given
position in an Int32Array
still contains a given value
and if so sleeps, awaiting a wakeup or a timeout.
It returns a string which is either “ok”, “not-equal”, or “timed-out”.
Note: This operation only works with a shared Int32Array
and may not be allowed on the main thread.
You should use wait_bigint
to operate on a BigInt64Array
.