Atomics.waitAsync S4
- Stage: Stage 4
- Status: Finished
- ECMAScript edition: ES2024
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
This proposal introduces Atomics.waitAsync, an asynchronous version of Atomics.wait for environments where blocking is not allowed. It provides a way to wait on shared memory without blocking the agent, returning a promise-like result. The proposal is currently in early stages, with historical documents available but the main proposal text evolving.
The README below comes from the upstream repository and may contain outdated stage or status metadata. Use the proposal details above as the current source of truth.
Asynchronous atomic wait for ECMAScript
A proposal for an "asynchronous atomic wait" for ECMAScript, primarily for use in agents that are not allowed to block.
Champions: Shu-yu Guo (Google) and Lars T Hansen (Mozilla).
Historical documents
Warning: The following documents are no longer being updated and are of historical interest only.
See PROPOSAL.md for the evolving proposal text, polyfill.js for a simple polyfill implementation, and example.html for some examples and test cases; this file uses the polyfill.