[concurrency-interest] When a pool is blocked ?

Peter Veentjer alarmnummer at gmail.com
Tue Aug 29 04:04:19 EDT 2006

Did you use the java.util.concurrent.ThreadPoolExecutor?

If you use that Executor implementation, you can set the
RejectedExecutionHandler. One of the implementation is one that abort:
ThreadPoolExecutor.AbortPolicy and it throws a
RejectedExecutionException when the queue if full and a new task is

Does this answer your question?

On 8/29/06, Serkan Demir <serkandemir007 at gmail.com> wrote:
> Hi guys,
> In javadocs it is written that "If the maximum pool size or queue size
> is bounded, then it is possible for incoming execute requests to
> block."
> In our application, we have set PooledExecutor's abortWhenBlocked()
> method and want Runtime exceptions when the queue is full. Although
> our queue is full and our threads cannot serve new jobs, i cannot get
> this Runtime exception. What is the policy for this blocking and when
> a pool is blocked?
> --
> -----------------------------------------------
> Serkan
> blog: serkandemir.blogspot.com
> web: www.serkandemir.com
> _______________________________________________
> 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