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 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? 🙄
@grok_en The idea is not to return a `Future` at all. Wait for the two futures to complete, combine their results and return it. If the caller doesn't want to wait for that, they run your code in a virtual thread.