Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

How would you implement a thread pool?
Creating too many threads in one JVM can cause the system to run out of memory or thrash due to excessive memory consumption. To prevent resource thrashing, server applications need some means of limiting how many requests are being processed at any given time. A thread pool offers a solution to both the problem of thread life-cycle overhead and the problem of resource thrashing.

Methods in org.apache.avalon.cornerstone.blocks.threads that return ThreadPool
 ThreadPool AbstractThreadManager.getThreadPool(java.lang.String name) :  Retrieve a thread pool by name.
 ThreadPool AbstractThreadManager.getDefaultThreadPool() :   Retrieve the default thread pool.
  
Posted By: Name:Rajesh Kr URL: How would you implement a thread pool?