r/javascript • • Dec 05 '25

The missing standard library for multithreading in JavaScript

https://github.com/W4G1/multithreading
146 Upvotes

33 comments sorted by

View all comments

Show parent comment

12

u/Scyth3 Dec 05 '25

I actually think you've done an amazing job (legitimately). Most languages have very easy concurrency packages and I'm more or less criticizing that in the JS/TS/Node ecosystem the core framework devs have not made it intuitive or simple to do anything. It just seems all half baked, to the point that most should do heavy loads with a language that is less complicated to manage.

I am going to check your library out later tonight though. It offers a ton of functionality. I'm hoping it exposes atomic locking, which is a personal favorite

6

u/Waltex Dec 05 '25

Appreciate it! For atomic locking the library exposes Mutex and RwLock. They use Atomics.wait() and Atomics.notify() under the hood. Let me know if you're missing any other features 🙂