4 ms·
Or just use fibers and avoid icky futures.
by paulyy_y 2y ago
Or just use fibers and avoid icky futures.
- aphantastic 2y agoDoesn’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.
- PaulDavisThe1st 2y agoIt'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.