Atomic condition variable
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 399
- Forks
- 11
- Avg merge
- 29m
- Merged PRs (30d)
- 1
Description
I've noticed that using Atomics.notify + Atomics.waitAsync is extremely slow. Just doing a normal Atomics.load + setTimeout polling loop is a lot faster.
Since Atomics is implemented in V8 I'm not sure there is much we can do about it. Other than maybe adding notes in our docs.
Refs: https://github.com/pinojs/thread-stream/blob/main/lib/wait.js
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13483
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced lib/wait.js implementation and compare its Atomics.waitAsync/Atomics.notify path with the Atomics.load plus setTimeout polling approach. Review the linked V8 issue for relevant context; the work is not defined until the project decides whether the outcome should be a fix, benchmark, or documentation note.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100