We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://tc39.es/proposal-atomics-wait-async/
(All relevant tests must be completed for TypedArray and BigInt)
Atomics.waitAsync
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true)
2. Let i be ? ValidateAtomicAccess(typedArray, index).
3. If arrayTypeName is "BigInt64Array", let v be ? ToBigInt64(value).
4. Otherwise, let v be ? ToInt32(value).
5. Let q be ? ToNumber(timeout)
6. If q is NaN, let t be +∞, else let t be max(q, 0)
7. If mode is sync, then
8. Let block be buffer.[[ArrayBufferData]]. NOT DIRECTLY OBSERVABLE
9. Let offset be typedArray.[[ByteOffset]]. NOT DIRECTLY OBSERVABLE
10. Let indexedPosition be (i × 4) + offset. NOT DIRECTLY OBSERVABLE
11. Let WL be GetWaiterList(block, indexedPosition).
12. Let promiseCapability be undefined. NOT DIRECTLY OBSERVABLE
13. If mode is async, then
14. Perform EnterCriticalSection(WL).
15. Let w be ! AtomicLoad(typedArray, i). NOT DIRECTLY OBSERVABLE
16. If v is not equal to w, then
17. Let W be AgentSignifier() NOT DIRECTLY OBSERVABLE
18. Let waiterRecord be a new Waiter Record { [[AgentSignifier]]: W, [[PromiseCapability]]: promiseCapability, [[Timeout]]: t, [[Result]]: "ok" }.
19. Perform AddWaiter(WL, waiterRecord).
20. If mode is sync, then
21. Perform LeaveCriticalSection(WL). NOT DIRECTLY OBSERVABLE
22. If mode is sync, then
23. Return promiseCapability.[[Promise]].
The text was updated successfully, but these errors were encountered:
@rwaldron I believe the status here has changed, right?
Sorry, something went wrong.
rwaldron
No branches or pull requests
Atomics.waitAsync
https://tc39.es/proposal-atomics-wait-async/
(All relevant tests must be completed for TypedArray and BigInt)
features.txt
Atomics.waitAsync
waitAsync
Atomics.waitAsync(typedArray, index, value, timeout)
DoWait ( mode, typedArray, index, value, timeout )
1. Let buffer be ? ValidateSharedIntegerTypedArray(typedArray, true)
2. Let i be ? ValidateAtomicAccess(typedArray, index).
3. If arrayTypeName is "BigInt64Array", let v be ? ToBigInt64(value).
4. Otherwise, let v be ? ToInt32(value).
5. Let q be ? ToNumber(timeout)
6. If q is NaN, let t be +∞, else let t be max(q, 0)
7. If mode is sync, then
8. Let block be buffer.[[ArrayBufferData]]. NOT DIRECTLY OBSERVABLE
9. Let offset be typedArray.[[ByteOffset]]. NOT DIRECTLY OBSERVABLE
10. Let indexedPosition be (i × 4) + offset. NOT DIRECTLY OBSERVABLE
11. Let WL be GetWaiterList(block, indexedPosition).
12. Let promiseCapability be undefined. NOT DIRECTLY OBSERVABLE
13. If mode is async, then
14. Perform EnterCriticalSection(WL).
15. Let w be ! AtomicLoad(typedArray, i). NOT DIRECTLY OBSERVABLE
16. If v is not equal to w, then
17. Let W be AgentSignifier() NOT DIRECTLY OBSERVABLE
18. Let waiterRecord be a new Waiter Record { [[AgentSignifier]]: W, [[PromiseCapability]]: promiseCapability, [[Timeout]]: t, [[Result]]: "ok" }.
19. Perform AddWaiter(WL, waiterRecord).
20. If mode is sync, then
21. Perform LeaveCriticalSection(WL). NOT DIRECTLY OBSERVABLE
22. If mode is sync, then
23. Return promiseCapability.[[Promise]].
The text was updated successfully, but these errors were encountered: