4 ms·
> It seems pretty hard to have any operation be blocking in node ... To my knowledge everything I can do in node is asynch As soon as you code an endless loop
by route66 15y ago
> It seems pretty hard to have any operation be blocking in node ... To my knowledge everything I can do in node is asynch
As soon as you code an endless loop in a function it blocks the server forever. Do a long calculation: it blocks for the time running. Node is no magic dust which turns everything it touches into asynch high speed code.
Node is asynch only when it comes to operations that are external to your code. (network, file system) . One could even argue that CPU intensive code being external to node but running on the same server could block if it's not running on a different CPU altogether.