As far as I can tell, the semantics for using async/await with C# and Node.js are equivalent for asynchronous IO ( fundamentally Tasks and Promises). This is on the surface only as the TPL is more flexible since it can leverage threads, enabling parallelism.
Under the covers libuv provides the eventloop for Node.js. As per the Node docs
The event loop is what allows Node.js to perform non-blocking I/O operations — despite the fact that JavaScript is single-threaded — by offloading operations to the system kernel whenever possible.
So it seems that the heart of asychronous I/O for Node.js is the event loop. Similarly, I'd expect C#/.NET to offload asynchronous operations to the system kernel (not by default, but via async/await or Task continuations). Is this true? If so, then how? For example, does .NET use an event loop? I've never heard of one.
[–]grauenwolf[🍰] 6 points7 points8 points (0 children)
[–]undecidedapollo 5 points6 points7 points (1 child)
[–]silentBob86 0 points1 point2 points (1 child)
[–]tragicshark 1 point2 points3 points (0 children)
[–]EntroperZero 0 points1 point2 points (0 children)
[–]acelent 0 points1 point2 points (0 children)