Atomics.wait support
See original GitHub issueHowdy, cool project! Curious if you have any plans to support signaling via Atomics.wait
to avoid the need for hard polling?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Atomics.wait() - JavaScript - MDN Web Docs
The Atomics.wait() static method verifies that a given position in an Int32Array still contains a given value and if so sleeps, awaiting a...
Read more >JavaScript built-in: Atomics: wait | Can I use... Support ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and ... JavaScript built-in: Atomics: wait.
Read more >JavaScript Atomics.wait() Method
The Atomics.wait() in JavaScript is an in-built method that is used to verify whether a given position in an Int32Array still contains a...
Read more >Atomics.wait, Atomics.notify, Atomics.waitAsync
Atomics.wait is only usable on worker threads. V8 version 8.7 now supports a non-blocking version, Atomics.waitAsync, which is also usable ...
Read more >Can we relax Atomics.wait to allow waiting on the main ...
In multithreaded applications, there is the .wait() primitive that allows one to synchronously wait on Worker threads.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I wonder if it’s possible to port one of the moderne work-stealing queue algorithms in the current state of nodejs’ ecosystem, that would probably be the best you can do (not knowing too much about the problem though).
I understand now this package was designed for web so I’ll move on. My background on this topic is with POSIX so I’ll investigate the low levels more in node/v8 to determine the feasibility/tradeoffs of leveraging notify/wait. Long story short, I have many threads processing commands and I don’t want those threads each consuming 100% of each CPU core. My current implementation leverages
postMessage
(which works well) but even with efficient v8 serialization there is still considerable overhead for real-time software, thus why I’m looking into leveraging ring buffers for many-to-many thread communication. Thanks for taking the time!