proposal-atomics-wait-async
proposal-atomics-wait-async copied to clipboard
Editorial: Wording for running concurrently
The spec text for AddAlarm contains:
After timeout milliseconds has passed, perform the following actions concurrently:
The actions here seem to avoid directly running JavaScript, which shouldn't be run concurrently with other JavaScript in the same agent. In particular:
- Call() will be used on a JavaScript function, but this may be avoided by the fix to #15
- In the
Atomics.waitcase, a record field will be set, which will then be read by the other agent once it's resumed. This also seems fine, though it seems more complicated without adding any particular clarity compared to what we have currently in the JS spec.
Let's think about what's the clearest way to phrase all of this. This editorial issue does not block Stage 3, but I'd like to think it through before merging into the main spec.