[Swift-commit] r5775 - trunk/src/org/griphyn/vdl/karajan/lib
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Sat Apr 28 23:26:35 CDT 2012
Author: hategan
Date: 2012-04-28 23:26:35 -0500 (Sat, 28 Apr 2012)
New Revision: 5775
Modified:
trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
Log:
proper synchronization to avoid zombie states
Modified: trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2012-04-29 04:23:14 UTC (rev 5774)
+++ trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2012-04-29 04:26:35 UTC (rev 5775)
@@ -113,8 +113,10 @@
static public void setProgress(VariableStack stack, String newState) throws ExecutionException {
RuntimeProgress p = getProgress(stack);
ProgressTicker t = getTicker(stack);
- t.dec(p.status);
- t.inc(newState);
+ synchronized(t) {
+ t.dec(p.status);
+ t.inc(newState);
+ }
p.status = newState;
t.dumpState();
}
@@ -124,7 +126,9 @@
ProgressTicker p = getTicker(stack);
setProgress(stack, rp);
rp.status = "Initializing";
- p.inc(rp.status);
+ synchronized(p) {
+ p.inc(rp.status);
+ }
p.dumpState();
return null;
}
More information about the Swift-commit
mailing list