3 ms·
with green threads, every result is "delayed" and available exactly when you want it (i.e. as indicated by naive reading of the control flow in code) > eager e
by tomp 3y ago
with green threads, every result is "delayed" and available exactly when you want it (i.e. as indicated by naive reading of the control flow in code)
> eager execution, interleave multiple concurrent tasks
green threads give you that for free
> deal with blocking
blocking is an implementation detail; both async/await and green threads can be implemented on top of either traditional blocking IO, or callback/non-blocking IO
I'd be even happier to discuss concrete code blocks / examples, that's where the superiority of green threads truly shines