[Swift-commit] cog r3788
swift at ci.uchicago.edu
swift at ci.uchicago.edu
Mon Sep 16 22:00:05 CDT 2013
------------------------------------------------------------------------
r3788 | hategan | 2013-09-16 21:59:17 -0500 (Mon, 16 Sep 2013) | 1 line
limit amount of time waiting for services to shut down to 10s (r3776 from trunk)
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (revision 3787)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (working copy)
@@ -65,6 +65,11 @@
public static final String TASK_ATTR_ID = "coaster:serviceid";
public static final String ATTR_USER_HOME_OVERRIDE = "userHomeOverride";
+
+ /**
+ * Maximum time to wait for services to acknowledge shutdown
+ */
+ public static final int REAPER_MAX_WAIT_TIME = 10 * 1000;
private static ServiceManager defaultManager;
@@ -472,6 +477,7 @@
public void run() {
logger.info("Cleaning up...");
count = services.size();
+ int waited = 0;
for (String url : services.values()) {
Object cred = credentials.get(url);
try {
@@ -489,9 +495,10 @@
}
}
synchronized (this) {
- while (count > 0) {
+ while (count > 0 && waited < REAPER_MAX_WAIT_TIME) {
try {
wait(100);
+ waited += 100;
}
catch (InterruptedException e) {
return;
More information about the Swift-commit
mailing list