[concurrency-interest] Sharing threads across executors

Dibyendu Majumdar concurrency-interest at majumdar.org.uk
Sun Mar 14 07:55:17 EDT 2010

On 14 March 2010 05:25, Joe Bowbeer <joe.bowbeer at gmail.com> wrote:

> The mechanism for sharing a single threadpool across multiple executors is
> delegation, as in your implemented solution.
> Since a ScheduledThreadPoolExecutor is a type of ThreadPoolExecutor, why
> not make the STPE the root of your executor tree?  In which case, tasks that
> need immediate execution would be submitted via execute(), and only the
> delayed tasks would be be submitted via one of the schedule() methods.
> If you want the idle STPE threads to die off, can you use setKeepAliveTime
> and allowCoreThreadTimeOut?  Even though a STPE is constructed with a fixed
> core size, I *think* these methods will still behave in their specified way.
Hi Joe,

Thanks for the suggestion, I shall have a look that tweaking these


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20100314/97a18385/attachment-0001.html>

More information about the Concurrency-interest mailing list