creating my own ThreadFactory
Hi
We would like our ThreadPoolExecutor to schedule threads within DIFFERENT ThreadGroups.
In order to allow this we need to create our own ThreadFactory instead of using the default Executors.defaultThreadFactory().
So we implement something like this:
class SimpleThreadFactory implements ThreadFactory {
ThreadGroup myThreadGroup = new ThreadGroup("myGroupName");
public Thread newThread(myThreadGroup Runnable r) {
return new Thread(r);
}
}
However we feel this will lead to unexpected results because our ThreadFactory will lack the default/usefull values set inExecutors.defaultThreadFactory().
Is this correct?
thanks
John

