[concurrency-interest] Unbounded queue and Max thread pool size.

Jeremy Manson jmanson at cs.purdue.edu
Mon Apr 11 23:14:37 EDT 2005


Hi Minnie,

The API says:

> Using an unbounded queue (for example a LinkedBlockingQueue without a
> predefined capacity) will cause new tasks to be queued in cases where
> all corePoolSize threads are busy. Thus, no more than corePoolSize
> threads will ever be created. (And the value of the maximumPoolSize
> therefore doesn't have any effect.)

The implementation reflects this in a pretty straightforward way.

					Jeremy

Minnie Haridasa wrote:
> 
> 
> Hi,
> 
> 
> 
> I just wanted to clarify a question I had.
> 
> Is it true that if a thread pool executor is created to use an
> unbounded queue with a core pool size and a max pool size, the core
> pool will never grow to the max pool size? The code does not indicate
> that, so I am hoping that irrespective of the queue associated with
> the executor, the core pool will grow to the max if need be.
> 
> 
> 
> Thanks,
> 
> MH
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> _______________________________________________ Concurrency-interest
> mailing list Concurrency-interest at altair.cs.oswego.edu 
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest



More information about the Concurrency-interest mailing list