[Swift-commit] r4173 - trunk/src/org/griphyn/vdl/karajan

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Mar 7 18:24:50 CST 2011


Author: hategan
Date: 2011-03-07 18:24:50 -0600 (Mon, 07 Mar 2011)
New Revision: 4173

Modified:
   trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java
Log:
fixed deadlock in future handling

Modified: trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java	2011-03-07 18:38:23 UTC (rev 4172)
+++ trunk/src/org/griphyn/vdl/karajan/DSHandleFutureWrapper.java	2011-03-08 00:24:50 UTC (rev 4173)
@@ -7,6 +7,7 @@
 
 import org.globus.cog.karajan.stack.VariableNotFoundException;
 import org.globus.cog.karajan.stack.VariableStack;
+import org.globus.cog.karajan.workflow.events.EventBus;
 import org.globus.cog.karajan.workflow.events.EventTargetPair;
 import org.globus.cog.karajan.workflow.futures.Future;
 import org.globus.cog.karajan.workflow.futures.FutureEvaluationException;
@@ -66,9 +67,13 @@
 			return;
 		}
 		while (!listeners.isEmpty()) {
-			ListenerStackPair etp = listeners.removeFirst();
+			final ListenerStackPair etp = listeners.removeFirst();
 			WaitingThreadsMonitor.removeThread(etp.stack);
-			etp.listener.futureModified(this, etp.stack);
+			EventBus.post(new Runnable() {
+                public void run() {
+                    etp.listener.futureModified(DSHandleFutureWrapper.this, etp.stack);
+                }
+			});
 		}
 		listeners = null;
 	}




More information about the Swift-commit mailing list