Reputation: 3001
I am developing a program that needs to spawn threads based on some inter arrival.
So my questions are:
Upvotes: 0
Views: 812
Reputation: 566
I didn't thoroughly read through your code, though i think there is a possibility which the thread you spawned previously has finished running and died, as every call is the same length and the rate of generating new call is constant (depends on your profile.getCallInterarrival();). When your program first start, it would constantly generate new threads until 1 minute later (60000), calls starts to die, and the system will reach an equilibrium which every new call created, there is an call died.
If my theory is right, your profile.getCallInterarrival() will return something like 1.33.
Upvotes: -1
Reputation: 10949
How do you know that only 47 are spawned? Why are you using an executor if you are spawning threads?
The limit is determined by the amount of memory, and the os. There isn't a fixed limitation.
No
I don't understand that question.
I haven't understood what you want to do, so I can unfortunately not answer that.
No, because the number of threads that you can create can be affected by VM arguments. It will also depend on OS, memory etc.
Upvotes: 1