4 ms·
By JS do you mean Node here? Node has both blocking and async versions of a lot of IO operations. But async IO is more commonly used certainly. The real questi
by zurn 6y ago
By JS do you mean Node here?
Node has both blocking and async versions of a lot of IO operations. But async IO is more commonly used certainly. The real question might be whether a thread pool backed async IO implementation makes your program do concurrent IO better than a GIL + blocking IO calls that release the GIL, it's not obvious to me.
(Doesn't Node have threads too nowadays?)
- jiofih 6y agoAlmost no code uses node’s sync APIs unless explicitly asked to, its ingrained in developer practices to the same level as not polluting global scope. Node’s threads are for cases you really want to do heavy computation without resorting to another language. All the I/O is still backed by LibUV and an event loop, threads don’t really offer any improvement there.