better termination for blocking threads

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5471 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 3dc208fad0
commit 941ab78d9b

@ -166,10 +166,9 @@ public class serverProcessor<J extends serverProcessorJob> {
if (executor != null & !executor.isShutdown()) { if (executor != null & !executor.isShutdown()) {
// wait for shutdown // wait for shutdown
try { try {
executor.shutdown();
executor.awaitTermination(millisTimeout, TimeUnit.MILLISECONDS); executor.awaitTermination(millisTimeout, TimeUnit.MILLISECONDS);
} catch (final InterruptedException e) {} } catch (final InterruptedException e) {}
executor.shutdown();
} }
serverLog.logInfo("serverProcessor", "queue " + this.processName + ": shutdown."); serverLog.logInfo("serverProcessor", "queue " + this.processName + ": shutdown.");
this.executor = null; this.executor = null;

Loading…
Cancel
Save