[Schmitzm-commits] r1993 - trunk/schmitzm-core/src/main/java/de/schmitzm/lang
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Fri May 11 22:25:54 CEST 2012
Author: alfonx
Date: 2012-05-11 22:25:53 +0200 (Fri, 11 May 2012)
New Revision: 1993
Modified:
trunk/schmitzm-core/src/main/java/de/schmitzm/lang/LangUtil.java
Log:
Georegestry f?\195?\164hrt in 2s statt 4s hoch.
Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/lang/LangUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/lang/LangUtil.java 2012-05-11 17:34:50 UTC (rev 1992)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/lang/LangUtil.java 2012-05-11 20:25:53 UTC (rev 1993)
@@ -2450,14 +2450,14 @@
/**
* Rauskopiert aus ExecutorService JavaDoc
*/
- public static void shutdownAndAwaitTermination(ExecutorService pool) {
+ public static void shutdownAndAwaitTermination(ExecutorService pool, int secondsToWait) {
pool.shutdown(); // Disable new tasks from being submitted
try {
// Wait a while for existing tasks to terminate
- if (!pool.awaitTermination(60, TimeUnit.SECONDS)) {
+ if (!pool.awaitTermination(secondsToWait, TimeUnit.SECONDS)) {
pool.shutdownNow(); // Cancel currently executing tasks
// Wait a while for tasks to respond to being cancelled
- if (!pool.awaitTermination(60, TimeUnit.SECONDS))
+ if (!pool.awaitTermination(secondsToWait, TimeUnit.SECONDS))
System.err.println("Pool " + pool + " did not terminate");
}
} catch (InterruptedException ie) {
More information about the Schmitzm-commits
mailing list