News for hackers. Stuff that matters.
Re:How to think about `async`/`await` in Rust by gpderetta on Wednesday July 05, 2023 @07:09AM (#36598656)
if your async task performs a raw read it also will block. In the coroutine case you of course need to call a read wrapper that allows for user mode scheduling. That can literally be the same function you use for async. Coroutines also allow library interposition tricks that transparently swap a blocking read with one that returns control to the event loop, so in principle existing blocking code need not change. Libpth did something like that for example. YMMV.

There are no comments on this comment yet.