Sunday, 15 July 2012

java - Do ThreadPoolExecutors that create daemon threads require shutdown? -



java - Do ThreadPoolExecutors that create daemon threads require shutdown? -

this seemed happen in application result of else going on in maven / junit test case environment (on code haven't read - maintaining foreign project). next code works desired, , tpe doesn't require shutdown:

final scheduledthreadpoolexecutor pool = new scheduledthreadpoolexecutor(1, new threadfactory() { @override public thread newthread(runnable task) { thread thread = new thread(task, replenisherthreadname); thread.setdaemon(true); homecoming thread; } });

if daemon thread, not keeping application alive. problem lies elsewhere (or it's not really daemon thread).

java threadpool daemon shutdown

No comments:

Post a Comment