0

I wanted to know just like we have -XSS to limit the stack size, why do we not see any option to limit the number of threads from the JVM (or that I do not know of). I do know that it can be limited from within the application logic using executors and thread pools. But anything from the JVM side or at least to limit overall Physical Memory (Not Heaps and native buffer)

As indicated I KNOW it can be done through the code and that to my my knowledge there are no switches to limit threads. My question is not "WHY" but "CAN" it be done?

Vipin Menon
  • 2,892
  • 4
  • 20
  • 35
  • 1
    Do you have a concern with the number of threads? – Leon May 23 '19 at 04:14
  • Why do you think that JVM should handle it, you can also handle this situation ? – Sambit May 23 '19 at 04:15
  • 1
    Possible duplicate of [Maximum number of threads in a JVM?](https://stackoverflow.com/questions/7726871/maximum-number-of-threads-in-a-jvm) – Leon May 23 '19 at 04:16

0 Answers0