Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Although I haven't seen the code regarding Threading, I think the correct
approach is to use Thread Groups and Thread Factory and an Executor, This is
how I approach Threading, usually.
final ThreadGroup tg = new ThreadGroup("Mofokom RA ThreadGroup") {
@Override
public void uncaughtException(Thread t, Throwable e) {
// do something meaningful?
}
};
final ThreadFactory tf = new ThreadFactory() {
public Thread newThread(Runnable r) {
Thread t = new Thread(tg, r);
t.setPriority(Thread.MAX_PRIORITY);
return t;
}
};
BlockingQueue<Runnable> workQueue = new ArrayBlockingQueue<Runnable>(
(Integer) properties.getProperty("WORK_QUEUE").getValue());
executor = new ThreadPoolExecutor(
EXECUTOR_CORE_POOL_SIZE,
EXECUTOR_MAX_POOL_SIZE,
EXECUTOR_POOL_TIMEOUT,
TimeUnit.SECONDS, workQueue, tf);
Original comment by wozza.xing
on 30 May 2013 at 10:24
This issue was closed by revision 5391b03465d8.
Original comment by EMMart...@gmail.com
on 25 Jun 2014 at 3:26
Original comment by EMMart...@gmail.com
on 25 Jun 2014 at 3:34
Original issue reported on code.google.com by
vil...@users.sourceforge.net
on 30 May 2013 at 2:41