| ▲ | tekacs 5 hours ago | ||||||||||||||||||||||||||||
I mean Java's Loom feels like the 'ultimate' example of the latter for the _ordinary_ programmer, in that it effectively leaves you just doing what looks like completely normal threads however you so please, and it all 'just works'. | |||||||||||||||||||||||||||||
| ▲ | ysleepy 5 hours ago | parent | next [-] | ||||||||||||||||||||||||||||
Java has gone full circle. Java had green threads in 1997, removed them in 2000 and brought them back properly now as virtual threads. I'm kinda glad they've sat out the async mania, with virtual threads/goroutines, the async stuff just feels like lipstick on a pig. Debugging, stacktrackes etc. are just jumbled. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ▲ | sqquima 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
I'm curious how escape analysis works with virtual threads. With the asynchronous model, an object local to a function will be migrated to the old generation heap while the external call gets executed. With virtual threads I imagine the object remains in the virtual thread "stack", therefore reducing pressure in garbage collection. | |||||||||||||||||||||||||||||
| ▲ | Rapzid 2 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||
The initial Loom didn't really provide the semantics and ergonomics of async/await which is why they immediately started working on structured concurrency. And for my money I prefer async/await to the structured concurrency stuff.. | |||||||||||||||||||||||||||||