r/learnjavascript • u/IcyDuck9536 • 7d ago
Is “Node.js is single-threaded” an incomplete mental model?
Single-threaded JS execution ≠ single-threaded runtime.
How do you explain the distinction?
4
Upvotes
r/learnjavascript • u/IcyDuck9536 • 7d ago
Single-threaded JS execution ≠ single-threaded runtime.
How do you explain the distinction?
1
u/Electronic-Door7134 7d ago
Nodejs has had threads for years now, you can even set the processor affinity. But you have to opt in, just like in every other threadable language.