[concurrency-interest] Pausing the idle threads in a pool for small time.

Joe Bowbeer jozart at blarg.net
Mon Apr 4 20:27:44 EDT 2005


Minnie Haridasa <minnieh at corp.earthlink.net> wrote:
> 
> Is it possible to pause/resume the idle threads in the pool?
> I am trying to implement request throttling.  In the process
> of doing so, I would like to pause all the idle threads in
> the pool once the request counter reaches its maximum to up
> until the request rate counter is reset. The request rate
> counter is gets reset every 1 second and is supposed to allow
> only 4 requests to pass through. 
> 

See PausableThreadPoolExecutor example in ThreadPoolExecutor javadoc.




More information about the Concurrency-interest mailing list