Hacker News new | past | comments | ask | show | jobs | submit login

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: