Minimum concurrency to benefit from JDK19 virtual threads

Viewed 24

According to JEP 425,

virtual threads can significantly improve application throughput when the number of concurrent tasks is high (more than a few thousand), and the workload is not CPU-bound

Why are virtual threads not helpful when the thread count is much lower than a few thousand? If I have 50 concurrent I/O-bound tasks, will I not significantly reduce CPU load by using virtual threads to eliminate heavyweight OS thread context switching?

0 Answers
Related