[Swift-commit] cog r3487

swift at ci.uchicago.edu swift at ci.uchicago.edu
Sat Oct 20 13:00:04 CDT 2012


------------------------------------------------------------------------
r3487 | hategan | 2012-10-20 12:58:18 -0500 (Sat, 20 Oct 2012) | 1 line

only update deadline if changed cpu has a chance of affecting it
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java	(revision 3486)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Block.java	(working copy)
@@ -193,8 +193,8 @@
             }
             last = scpus.last();
         }
-        if (last != null) {
-            setDeadline(Time.min(last.getTimeLast().add(bqp.getSettings().getReserve()),
+        if (last == cpu) {
+            setDeadline(Time.min(cpu.getTimeLast().add(bqp.getSettings().getReserve()),
                 getEndTime()));
         }
     }
@@ -512,12 +512,14 @@
     }
 
     public void suspend() {
-        suspended = true;
+        synchronized(this) {
+            suspended = true;
+        }
         // ensure we still shut down if no jobs are running
         shutdownIfEmpty(null);
     }
 
-    public boolean isSuspended() {
+    public synchronized boolean isSuspended() {
         return suspended;
     }
 



More information about the Swift-commit mailing list