3 ms·
How do you implement doThingOne? You should read the "structured concurrency" link in the article. You have to explicitly wrap the call to doThingOne in a futu
by mgraczyk 4y ago
How do you implement doThingOne?
You should read the "structured concurrency" link in the article. You have to explicitly wrap the call to doThingOne in a future under a structured concurrency scope. The code example you wrote is not going to be possible in Java without implementing doThingOne in a complicated way.
- spullara 4y agoYou don't have to use structured concurrency. The two methods use a virtual thread executor and return the result of submitting work. Structured concurrency is great but not necessary. https://www.reactivesystems.eu/2022/06/17/introduction-to-project-loom.html https://www.reactivesystems.eu/2022/06/17/introduction-to-pr...