News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by tomp on Sunday September 17, 2023 @10:51AM (#37545614)
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

There are no comments on this comment yet.