[Swift-commit] r5141 - branches/release-0.93/src/org/griphyn/vdl/karajan/lib/cache

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Tue Sep 20 21:07:40 CDT 2011


Author: hategan
Date: 2011-09-20 21:07:40 -0500 (Tue, 20 Sep 2011)
New Revision: 5141

Modified:
   branches/release-0.93/src/org/griphyn/vdl/karajan/lib/cache/File.java
Log:
fixed file cache deadlock

Modified: branches/release-0.93/src/org/griphyn/vdl/karajan/lib/cache/File.java
===================================================================
--- branches/release-0.93/src/org/griphyn/vdl/karajan/lib/cache/File.java	2011-09-20 22:28:37 UTC (rev 5140)
+++ branches/release-0.93/src/org/griphyn/vdl/karajan/lib/cache/File.java	2011-09-21 02:07:40 UTC (rev 5141)
@@ -9,6 +9,7 @@
 
 import org.globus.cog.karajan.stack.VariableStack;
 import org.globus.cog.karajan.workflow.ExecutionException;
+import org.globus.cog.karajan.workflow.events.EventBus;
 import org.globus.cog.karajan.workflow.futures.Future;
 import org.globus.cog.karajan.workflow.futures.FutureEvaluationException;
 import org.globus.cog.karajan.workflow.futures.FutureListener;
@@ -152,9 +153,13 @@
 		if (listeners != null) {
 			Iterator<ListenerStackPair> i = listeners.iterator();
 			while (i.hasNext()) {
-				ListenerStackPair etp = i.next();
+				final ListenerStackPair etp = i.next();
 				i.remove();
-				etp.listener.futureModified(this, etp.stack);
+				EventBus.post(new Runnable() {
+                    public void run() {
+                        etp.listener.futureModified(File.this, etp.stack);
+                    }
+				});
 			}
 		}
 	}




More information about the Swift-commit mailing list