back

by kimi·3y ago·view on hn ↗
It definitely would. I - for one - won't be rewriting our 20+ year old servlet app in anything else but servlets, because it has proven to be an exceptionally stable environment. More than virtual threads for Tomcat requests, I'd love cheap, structured threads to be run from within a request, eg to access the database while I'm reading a webservice.
1 comments
JDK21 has structured concurrency. It works with virtual threads so the main task will be moved aside (from the OS thread) until the sub tasks finnish.

https://www.infoq.com/news/2023/06/structured-concurrency-jd...

Yes, that's what I was referring to.