W3cubDocs

/JavaScript

Atomics

The Atomics object provides atomic operations as static methods. They are used with SharedArrayBuffer objects.

The Atomic operations are installed on an Atomics module. Unlike the other global objects, Atomics is not a constructor. You cannot use it with a new operator or invoke the Atomics object as a function. All properties and methods of Atomics are static (as is the case with the Math object, for example).

Properties

Atomics[Symbol.toStringTag]
The value of this property is "Atomics".

Methods

Atomic operations

When memory is shared, multiple threads can read and write the same data in memory. Atomic operations make sure that predictable values are written and read, that operations are finished before the next operation starts and that operations are not interrupted.

Atomics.add()
Adds the provided value to the existing value at the specified index of the array. Returns the old value at that index.
Atomics.and()
Computes a bitwise AND on the value at the specified index of the array with the provided value. Returns the old value at that index.
Atomics.compareExchange()
Stores a value at the specified index of the array, if it equals a value. Returns the old value.
Atomics.exchange()
Stores a value at the specified index of the array. Returns the old value.
Atomics.load()
Returns the value at the specified index of the array.
Atomics.or()
Computes a bitwise OR on the value at the specified index of the array with the provided value. Returns the old value at that index.
Atomics.store()
Stores a value at the specified index of the array. Returns the value.
Atomics.sub()
Subtracts a value at the specified index of the array. Returns the old value at that index.
Atomics.xor()
Computes a bitwise XOR on the value at the specified index of the array with the provided value. Returns the old value at that index.

Wait and notify

The wait() and notify() methods are modeled on Linux futexes ("fast user-space mutex") and provide ways for waiting until a certain condition becomes true and are typically used as blocking constructs.

Atomics.wait()

Verifies that the specified index of the array still contains a value and sleeps awaiting or times out. Returns either "ok", "not-equal", or "timed-out". If waiting is not allowed in the calling agent then it throws an Error exception (most browsers will not allow wait() on the browser's main thread).

Atomics.notify()
Notifies agents that are waiting on the specified index of the array. Returns the number of agents that were notified.
Atomics.isLockFree(size)

An optimization primitive that can be used to determine whether to use locks or atomic operations. Returns true, if an atomic operation on arrays of the given element size will be implemented using a hardware atomic operation (as opposed to a lock). Experts only.

Specifications

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
No
No
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
add 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
and 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
compareExchange 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
exchange 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
isLockFree 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
load 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
notify 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
Uses the non-standard name: wake
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
Uses the non-standard name: wake
63
Disabled
63
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 63: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Uses the non-standard name: wake
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
48 — 55
Disabled
Disabled From version 48 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
46 — 48
Disabled
The count parameter defaults to 0 instead of the later-specified +Infinity.
Uses the non-standard name: futexWake
Disabled From version 46 until version 48 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
10.1 — ?
Uses the non-standard name: wake
or 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
store 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
sub 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
wait 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
48 — 55
Disabled
Disabled From version 48 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
46 — 48
Disabled
The method returns values Atomics.OK, Atomics.TIMEDOUT, and Atomics.NOTEQUAL, instead of the later-specified strings.
Uses the non-standard name: futexWait
Disabled From version 46 until version 48 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
xor 68
68
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This was a temporary removal while mitigations were put in place.
16
16
Support was removed to mitigate speculative execution side-channel attacks (Windows blog).
57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No 10.1 — ?
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
add 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
and 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
compareExchange 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
exchange 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
isLockFree 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
load 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
notify 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
Uses the non-standard name: wake
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
Uses the non-standard name: wake
? 63
Disabled
63
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 63: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Uses the non-standard name: wake
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
48 — 55
Disabled
Disabled From version 48 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
46 — 48
Disabled
The count parameter defaults to 0 instead of the later-specified +Infinity.
Uses the non-standard name: futexWake
Disabled From version 46 until version 48 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
or 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
store 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
sub 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
wait 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
48 — 55
Disabled
Disabled From version 48 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
46 — 48
Disabled
The method returns values Atomics.OK, Atomics.TIMEDOUT, and Atomics.NOTEQUAL, instead of the later-specified strings.
Uses the non-standard name: futexWait
Disabled From version 46 until version 48 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
xor 60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
60 — 63
60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks. This is intended as a temporary measure until other mitigations are in place.
? 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog).
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
55 — 57
46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true). To change preferences in Firefox, visit about:config.
No No No
Server
Node.js
Basic support No
add 8.10.0
and 8.10.0
compareExchange 8.10.0
exchange 8.10.0
isLockFree 8.10.0
load 8.10.0
notify 8.10.0
8.10.0
Uses the non-standard name: wake
or 8.10.0
store 8.10.0
sub 8.10.0
wait 8.10.0
xor 8.10.0

Compatibility notes

Prior to Firefox 48, the latest API names and semantics weren't implemented yet. The changes between Firefox version 46 and version 48 are:

  • The methods Atomics.futexWakeOrRequeue() and Atomics.fence() are now removed entirely (bug 1259544 and bug 1225028).
  • The methods Atomics.wait() and Atomics.wake() were named Atomics.futexWait() and Atomics.futexWake() (bug 1260910). Note: The old names have been removed in version 49 and later (bug 1262062). Atomics.wake() has then been renamed to Atomics.notify() in version 63.
  • The properties Atomics.OK, Atomics.TIMEDOUT, Atomics.NOTEQUAL have been removed. The Atomics.wait() method now returns the strings "ok", "timed-out" and "not-equal" (bug 1260835).
  • The count parameter of the Atomics.wake() method has been changed: it now defaults to +Infinity, not 0 (bug 1253350).

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics