[concurrency-interest] Putting tasks directly on TPE queue

gustav trede gustav.trede at gmail.com
Fri Dec 25 06:14:17 EST 2009


2009/12/25 Gaurav Arora <G.Arora at iontrading.com>

>   I have read a few threads dating back 2007 about putting tasks directly
> on a TPE queue. The general reply (as is mentioned in the API as well) is to
> not access the queue directly. In all those threads, the corePoolSize and
> the maximumPoolSize were different. What if the core pool size is the same
> as the maximum pool size and all core threads are started before any tasks
> are submitted on the queue? Is it still a bad idea to put tasks directly on
> the queue? Can it can cause hard to track down failures?
>
> We use that concept in Grizzly, depending on reconfigure(threadpoolconfig
config) method params we use LTQ if possible,
switching pool impl transparent in runtime.

https://grizzly.dev.java.net/source/browse/grizzly/trunk/code/modules/utils/src/main/java/com/sun/grizzly/util/FixedThreadPool.java?rev=4055<https://grizzly.dev.java.net/source/browse/grizzly/trunk/code/modules/utils/src/main/java/com/sun/grizzly/util/FixedThreadPool.java?rev=4055&view=markup>

https://grizzly.dev.java.net/source/browse/grizzly/trunk/code/modules/utils/src/main/java/com/sun/grizzly/util/GrizzlyExecutorService.java?rev=4054

-- 
regards
 gustav trede
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20091225/411d503d/attachment.html>


More information about the Concurrency-interest mailing list