News for hackers. Stuff that matters.
Re:We 30x'd our Node parallelism by phoe-krk on Friday December 13, 2019 @11:28AM (#21782971)
An event loop is basically a single thread that executes functions from a FIFO queue. A function can put itself on a queue by "yielding", which means, allowing other functions to execute.

If your function blocks, for example, by performing a wait on something without yielding, then nothing else gets computed because of the wait, but the event queue is occupied since the function has not yielded. This breaks the cooperative part of the cooperative multithreading mechanism of Node.

Re:We 30x'd our Node parallelism by MayeulC on Friday December 13, 2019 @11:38AM (#21783063)
All right, thank you. So it's basically the same as any other non-preemptive multitasking design.

If the event loop is part of the Node language/runtime, I can see the case for making it preemptive.

Re:We 30x'd our Node parallelism by Izkata on Saturday December 14, 2019 @12:09AM (#21787941)
> So it's basically the same as any other non-preemptive multitasking design.

All this has happened before. All this will happen again.