[concurrency-interest] When a pool is blocked ?

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


I haven't used the old version of the concurrency library. You know
there is a backport from the concurrency library for java 1.4 ?

http://dcl.mathcs.emory.edu/util/backport-util-concurrent/

On 8/29/06, Serkan Demir <serkandemir007 at gmail.com> wrote:
> sorry i forgot to say which release i used. it is concurrent-1.3.4
> (oswego jar). I have already set abortWhenBlocked() and waiting for
> Runtime exceptions whenever queue is full.
> Is exception thrown when both the queue is full and all threads are
> unavailable or either queue is full or threads in the pool are
> unavailable?
>
>
>
> On 8/29/06, Peter Veentjer <alarmnummer at gmail.com> wrote:
> > 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
> > added.
> >
> > 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
> > >
> >
>
>
> --
> -----------------------------------------------
> Serkan
> blog: serkandemir.blogspot.com
> web: www.serkandemir.com
>


More information about the Concurrency-interest mailing list