Comment

Comment by zetaposter

I should add that the concurrent algorithm I described for processing data from a socket, i.e asynchronously read data fragment (i + 1) then do work on data fragment i, would only be optimal if the throughout of the work you do on the data is higher than reading throughout.

Even if the above condition doesn't hold, you would have to be very careful to do better with threads.

Is it just an arbitrary design decision that NodeJS is single-threaded?

parent zetaposter 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton