1 of 10

Cacophony

Atomics.wake sounds too much like Atomics.wait

2 of 10

Alice: "I'm using Atomics to implement a thing. The program is calling Atomics.wake from one agent to wake the waiting agents, which previously called Atomics.wait—"

Carol: "I'm sorry, did you say you're calling Atomics.wait in the waking agent? Or Atomics.wake in waiting agent?"

Alice: "Atomics.wake from a writing agent (which is also the waking agent), to wake the waiting agents, all of which previously called Atomics.wait"

Carol: (clearly mishearing) "well you need to call Atomics.wait first, right—"

Alice: "Yes, that's what I said. The writing agent calls Atomics.wake to wake the waiting agents... which previously called Atomics.wait"

3 of 10

The feature was published in ECMAScript 2017, but was only available in all browsers from November 14, 2017 to January 4, 2018.

4 of 10

Browser

Version Enabled

Version Disabled

Start Date

End Date

Chrome

60.*

64.*

2017-07-25

2018-01-24

Edge

16.*

17.* ?

2017-09-26

2018-04-30

Firefox

57

57.0.4

2017-11-14

2018-01-04

Safari

11

11.0.3

2017-09-19

2018-01-23

5 of 10

In response to Meltdown/Spectre, both Atomics & SharedArrayBuffer were disabled by default in all major browsers in January 2018 (sort of)

6 of 10

A unique rectification opportunity.

7 of 10

Presumably, no new application code has been written that uses Atomics & SharedArrayBuffer.

8 of 10

Wake In The Wild (According to Github)

https://gist.github.com/rwaldron/7ccba99a8b218a8b2c7ce3d421384a12

Intentional Omissions:

  • Test262: Submodules, copies, derived works
  • JS engine test material (ChakraCore, JavaScriptCore, SpiderMonkey, V8, Moddable)

9 of 10

?

Atomics.wake => Atomics.notify

10 of 10