Intent to Prototype: Main thread Atomics.wait

45 views
Skip to first unread message

Chromestatus

unread,
Apr 22, 2026, 8:50:33 PM (6 hours ago) Apr 22
to blin...@chromium.org, tli...@google.com
Contact emails
tli...@google.com

Explainer
https://github.com/WebAssembly/shared-everything-threads/blob/main/proposals/shared-everything-threads/WaitOnMainThread.md

Specification
No information provided

Summary
Allow Atomics.wait on the main browser thread. Atomics.wait currently throws on the main thread, which nudges developers towards using spinlocks instead. Spinlocks are worse for performance and power usage than Atomics.wait, so this change allows developers to write more efficient multithreaded applications.

Blink component
Blink>JavaScript

Web Feature ID
Missing feature

Motivation
Atomics.wait currently throws unconditionally on the main thread. This was originally meant to nudge developers toward architectures (e.g. message passing with postMessage or lock-free data structures) that do not risk blocking the main thread, but in practice it has just pushed developers to use spinlocks instead. Spinlocks are worse than Atomics.wait for performance and power consumption, so allowing Atomics.wait on the main thread will help developers create more efficient multithreaded applications.

Initial public proposal
https://github.com/WebAssembly/shared-everything-threads/discussions/112

Goals for experimentation
None

Requires code in //chrome?
False

Tracking bug
https://g-issues.chromium.org/issues/505518777

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5140239829041152?gate=5106884509040640

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages