Does the JVM limit the number of threads an Executor can run?

997 views Asked by At

I know I can use a fixedThreadPool to limit the amount of threads my program uses at one time. If I use a cachedThreadPool and could run 10,000 threads, will the JVM schedule them appropriately so not too many are running at the same time?

1

There are 1 answers

0
Chaitanya P On

JVM is tied to OS limitations. OS is tied to Virtual memory, swap space and stack size limitations.

Three stackoverflow threads below should explain: