Hacker News new | ask | show | jobs
by paulyy_y 610 days ago
Or just use fibers and avoid icky futures.
1 comments

Doesn’t change the core issue, which is that if you want to do multiple operations simultaneously that take time to execute, you’re going to need to write stuff to handle that which you wouldn’t otherwise. Whether it’s channel piping or async awaiting is semantics.
It's not just semantics. With synchronous code, the blocking aspects are invisible in when reading code:

     size_t rcnt = read (fd, buf, sizeof (buf)); /* nobody knows if we will block */
With some async code, the fact that there will be a wait and then a continuation is visible from just reading the code.