3 ms·
The JVM will need to do context switching when reallocating the real thread that is running a blocked virtual thread to the next available virtual thread. It wo
by giamma 2y ago
The JVM will need to do context switching when reallocating the real thread that is running a blocked virtual thread to the next available virtual thread. It won't be CPU context switching, but context switching happens at the JVM level and represents an effort.
- frant-hartm 2y agoOk. This JVM-level switching is called mounting/un-mounting of the virtual thread and is supposed to be several orders of magnitude cheaper compared to normal context switch. You should be fine with millions of virtual threads.