[concurrency-interest] How to set the thread group of the ForkJoinPool?

Sébastien Bocq sebastien.bocq at gmail.com
Wed Mar 7 14:28:45 EST 2012


I use different pools and I need to identify from which pool threads
are coming from. For instance, I want to use my own naming scheme.
Right now, I use a standard ThreadPoolExecutor and pass my factory as
last parameter to its constructor:

ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long
keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue,
ThreadFactory threadFactory)

But I'd like to replace it with the ForkJoinPool.

Sebastien

Le 7 mars 2012 19:20, Peter Firmstone <peter.firmstone at zeus.net.au> a écrit :
> Hmm, you're right, I'm guessing you want to use the system thread group
> or something similar?
>
> Cheers,
>
> Peter.
>
>
>
> On Thu, 2012-03-08 at 04:13, Mark Thornton wrote:
>> On 07/03/12 17:48, Peter Firmstone wrote:
>> > Implement ForkJoinPool.ForkJoinWorkerThreadFactory and extend
>> > ForkJoinWorkerThread
>> >
>> >
>> Doesn't work because ForkJoinWorkerThread doesn't have a constructor
>> which takes the ThreadGroup as a parameter.
>>
>> Mark Thornton
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest



More information about the Concurrency-interest mailing list