waitAsync

fun waitAsync(typedArray: Int32Array<*>, index: Int, value: Int, timeout: Int = definedExternally): WaitResult(source)
fun waitAsync(typedArray: BigInt64Array<*>, index: Int, value: BigInt, timeout: Int = definedExternally): WaitResult(source)

A non-blocking, asynchronous version of wait which is usable on the main thread. Waits asynchronously on a shared memory location and returns a Promise

Parameters

typedArray

A shared Int32Array or BigInt64Array.

index

The position in the typedArray to wait on.

value

The expected value to test.

timeout

The expected value to test.