3 ms·
You're going to have a lot of replies that simply say yes but they're different tools and they have different use cases. The implicit threading of Loom works w
by jayd16 5y ago
You're going to have a lot of replies that simply say yes but they're different tools and they have different use cases.
The implicit threading of Loom works well for things like transparently dealing with IO without blocking an OS thread.
For things like posting back to a UI thread, you'll still need explicit handling not unlike async/await. It seems like Java is taking a scoped approach. https://wiki.openjdk.java.net/display/loom/Structured+Concurrency https://wiki.openjdk.java.net/display/loom/Structured+Concur...
- marwis 5y agoIt says that you can implement your own scheduler for virtual threads so presumably you can make one that schedules back to UI loop.