logoalt Hacker News

jitlyesterday at 10:45 PM1 replyview on HN

yes, all of node.js is built on such operations. what do you think is happening when you `await fs.promises.readFile(name, 'utf8')`? it dispatches a libuv thread to read the file you want, and resolve the promise when the background thread has completed the operation.


Replies

kikimoratoday at 1:14 AM

Except there is often no background thread but async IO.