Virtual threads are amazing, but only half of Loom's play. The other half is making use of quasi infinite threads with a new concurrency programming model: Structured Concurrency. JEP 428 proposes that - will it make it into #JDK19? 🤞 openjdk.java.net/jeps/428
@nipafx @brunoborges They got me on "enhancing observability" as tracing async flows running on different threads is a nightmare. Loved the unit-of-work approach.
@nipafx Just curious how many threading abstractions we need to write single threaded programs? :)
@nipafx That's even bigger than the virtual threads. Basically virtual threads is the way of using structured concurrency instead of going to the reactive stack
@nipafx This looks very good. Is there anything in this proposal that can't be implemented with a library, though? I haven't tried, but I think it should be possible to implement that scope using existing APIs?
@nipafx When I need to propogate results from two sub-Futures to parent Future, I can use something like thenCombineAsync(). Seems I can't make smtg like this within a new scope syntax. Do I need to wrap scope (where join of sub-futures forcefully happens) results in a Future again? 🙄