coderef

Atomics.pause()Baseline · Newly available

The Atomics.pause() static method gives a hint to the CPU that the code calling the method is in a short-duration wait for shared memory, known as spinning or a spinlock.

Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Apr 1, 2025.

Browser support

DesktopChrome
1–132Not supported
133+Supportedsince Feb 4, 2025
Current: 155
Edge
12–132Not supported
133+Supportedsince Feb 6, 2025
Current: 154
Firefox
1–136Not supported
137+Supportedsince Apr 1, 2025
Current: 157
Safari
1–18.3Not supported
18.4+Supportedsince Mar 31, 2025
Current: 27
MobileChrome Android
18–132Not supported
133+Supportedsince Feb 4, 2025
Current: 155
Firefox Android
4–136Not supported
137+Supportedsince Apr 1, 2025
Current: 157
Safari iOS
1–18.3Not supported
18.4+Supportedsince Mar 31, 2025
Current: 27

How to use

Every current browser supports this, but it only became Baseline on Apr 1, 2025. Use it as a progressive enhancement, or keep a fallback if you support older devices.

Example

Full syntax and examples are on MDN: pause.

Feature detection

JS · check before using
if ("pause" in Atomics || ("prototype" in Atomics && "pause" in Atomics.prototype)) {
  // Atomics.pause is available
}

Documentation (MDN)

Specification