posted 19 years ago
I had to ask somebody down the hall who said 1 lakh == .1 million
Thread pools (and other resource pools) often work with a queue. You put commands into the queue and some number of threads pull commands out of the queue and execute them. If you put commands in faster than the threads can handle them, the commands pile up in the queue and wait.
There are many things you can tune ... Set a max size on the queue, when it's full throw an exception or wait or send a busy reply. Set max & min numbers of threads, start new ones up to the max, stop idle ones down to the min. Set max wait time for queue items and throw exceptions if they're in there too long.
The JDK 5 BlockingQueue and Executors support a lot of options. What thread pool are you using?
[ February 24, 2005: Message edited by: Stan James ]
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi