We should examine our calls to new Thread() and the like in the context of virtual threads.
- [x] #36694
- [x] #36695
- [x] #36795
- [x] #36804
- [x] #36802
- [x] #36699
- [x] #36791
- [x] ~Use virtual threads in NettyWebServer if enabled~
- [x] ~Use virtual threads in TomcatWebServer if enabled~
- [x] #36800
- [x] #36806
- [x] #36805
- [x] #36807
Comment From: mhalbritter
We need to examine where exactly we want to have virtual threads.
Comment From: mhalbritter
We can't use virtual threads in NettyWebServer or TomcatWebServer because the thread there is created as a non-daemon thread to block JVM shutdown. This isn't possible to do with virtual threads, as they are always daemon threads.
Comment From: mhalbritter
We've not made any changes. We're using virtual threads when calling user code (e.g. on webserver requests, scheduling, task execution, async message handling).
If that turns out to be a problem or maybe if virtual threads get rid of their limitations (pinning on synchronized and the like), we may revisit this decision.