3 ms·
Async handles thread contexts better. Maybe I'm out of the loop but implicit blocking patterns haven't taken over gui programming just yet.
by jayd16 3y ago
Async handles thread contexts better. Maybe I'm out of the loop but implicit blocking patterns haven't taken over gui programming just yet.
- samus 3y agoLoom is very new, and Java on the desktop is almost dead. Even though virtual threads could be useful for GUI programming, I don't expect significant innovation in that area. But the upcoming Structured Concurrency[0] and Scoped Values[1] JEPs make things hopefully easier. [0]: https://openjdk.org/jeps/462 https://openjdk.org/jeps/462 [1]: https://openjdk.org/jeps/446 https://openjdk.org/jeps/446
- jayd16 3y agoStructured concurrency looks good but is it really better than async syntax?
- samus 3y agoI have to admit that async syntax has a certain charm, as it has deep connections to iterators. (I have to program with Unity for my master thesis). But Structured Concurrency leverages well-known blocking syntax that doesn't require further explanation. It's not even specific to virtual threads.