[concurrency-interest] ThreadPoolExecutor with corePoolSize = 0

David Holmes dcholmes at optusnet.com.au
Thu Dec 21 20:50:43 EST 2006


Sam,

I think what you propose will work, but as I haven't tried it ...

The other option, if you control the deployment is to place the Java 6
version on the bootclasspath to override the Java 5 version.

David

> -----Original Message-----
> From: concurrency-interest-bounces at cs.oswego.edu
> [mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Sam
> Berlin
> Sent: Friday, 22 December 2006 4:49 AM
> To: dholmes at ieee.org
> Cc: concurrency-interest at cs.oswego.edu
> Subject: Re: [concurrency-interest] ThreadPoolExecutor with corePoolSize
> = 0
>
>
> Thanks for the pointer to the code.  One minor problem with copying
> the code as-is is the signature of RejectedExecutionHandler's reject
> method takes a Runnable and a ThreadPoolExecutor.  If possible, we
> would like to allow pre-existing RejectedExecutionHandlers (that is,
> ones written with java.util.concurrent.ThreadPoolExecutor in mind) to
> continue being used.  Do you expect there'll be any problems with
> altering the copy to extend from
> java.util.concurrent.ThreadPoolExecutor instead of
> AbstractExecutorService?  It has the side-effect of duplicating all
> the state variables of the super's ThreadPoolExecutor, but that's not
> as large a problem as, say, accidentally firing a method from the
> super's class instead of the current one.
>
> Thanks,
>  Sam
>
> On 12/20/06, David Holmes <dcholmes at optusnet.com.au> wrote:
> > Hi Sam,
> >
> > > Your suggestion of using the Java 6 TPE code is likely what we'll end
> > > up doing.  Is the public domain version different from the one in the
> > > Java 6 source?  Where would I go to find that version?
> >
> > The public domain version is here - see jsr166x:
> >
> > http://gee.cs.oswego.edu/dl/concurrency-interest/index.html
> >
> > It contains bug fixes that will eventually make their way into
> the Java 6
> > version.
> >
> > Cheers,
> > David
> >
> >
> _______________________________________________
> 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