Home
»
Archives for
December 2025
[Java] - Thread A->Z
December 16, 2025 |
Thread
==========================================================================
Thread
==============================
Virtual Thread
Ref :
Virtual threads are lightweight threads that reduce the effort of writing, maintaining, and debugging high-throughput concurrent applications.
A platform thread is implemented as a thin wrapper around an operating system (OS) thread. A platform thread runs Java code on its underlying OS thread, and the platform thread captures its OS thread for the platform thread's entire lifetime. Consequently, the number of available platform threads is limited to the number of OS threads
Virtual Thread:
- A virtual thread is also an instance of java.lang.Thread..
- A virtual thread isn't tied to a specific OS thread.
- Virtual threads are implemented in a similar way to virtual memory.
Why Use Virtual Threads:
- Use virtual threads in high-throughput concurrent applications, especially
those that consist of a great number of concurrent tasks that spend much of their time
waiting.
- Virtual threads are not faster threads.



Previous Article