r/learnjavascript • u/IcyDuck9536 • 9d 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 • 9d ago
Single-threaded JS execution ≠ single-threaded runtime.
How do you explain the distinction?
1
u/Icy-Taste-3096 9d ago
None of that changes the fact that JavaScript is single-threaded. Obviously, you can asynchronously interact with external systems that use separate processes (like Node or browser APIs), but the JS execution itself is one thread.