Atomics.waitAsync

Adds Atomics.waitAsync, the async version of Atomics.wait. Atomics.waitAsync allows programmers to wait on a SharedArrayBuffer location in the same fashion as Atomics.wait but returns a Promise instead.

Motivation

Atomics.wait blocks the thread and cannot be used on the main web browser thread, where blocking is disallowed. This makes coordination via SharedArrayBuffers between the main thread and worker threads more ergonomic.

Documentation

Specification

Editor's draft

Status in Chromium

Blink>JavaScript


Enabled by default (tracking bug) in:

  • Chrome for desktop release 87
  • Chrome for Android release 87
  • Android WebView release 87

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • Positive
  • No signal
  • Positive
  • No signals

Owners

Search tags

Atomics, waitAsync,

Last updated on 2020-10-28