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

Indeed, look at Openresty which is async but written as if the code was blocking, using coroutines.



Don't the coroutines still have to explicitly yield? In other words, not quite written as if the code was blocking?


No, it is all implicit, ie the library function is doing the yield for you, it is invisible in the code you write. Obviously if you are writing new blocking primitives you need to deal with it, but you rarely are as most of these are the socket, timer calls provided by core.




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

Search: