[Swift-commit] cog r3776
swift at ci.uchicago.edu
swift at ci.uchicago.edu
Thu Sep 5 14:40:03 CDT 2013
------------------------------------------------------------------------
r3776 | hategan | 2013-09-05 14:39:16 -0500 (Thu, 05 Sep 2013) | 1 line
set a limit of 10 seconds to wait for services to acknowledge shutdown
------------------------------------------------------------------------
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 3775)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceManager.java (working copy)
@@ -67,6 +67,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;
@@ -474,6 +479,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 {
@@ -491,9 +497,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