Virtual thread = lightweight object
Not an OS thread. Just JVM state. Can create millions per JVM. Memory: ~200 bytes each vs ~1MB for platform thread.
Advertisement
Virtual thread = lightweight object
Not an OS thread. Just JVM state. Can create millions per JVM. Memory: ~200 bytes each vs ~1MB for platform thread.
Advertisement
Carrier threads
Small pool of OS threads (typically = CPU count). Virtual threads mount on a carrier to execute.