changeset 1203:7fde9811e3bf

Fixed bugs occurring when running without ViffReactor.
author Marcel Keller <mkeller@cs.au.dk>
date Mon, 20 Jul 2009 12:22:02 +0200
parents 90e278d7a950
children d43f766c4cac
files viff/runtime.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/viff/runtime.py	Mon Jul 20 12:04:46 2009 +0200
+++ b/viff/runtime.py	Mon Jul 20 12:22:02 2009 +0200
@@ -653,6 +653,9 @@
         something to be used afterwards, add further callbacks to the returned
         deferred."""
 
+        if not self.using_viff_reactor:
+            return self.schedule_callback(deferred, func, *args, **kwargs)
+
         if isinstance(deferred, Share):
             fork = Share(deferred.runtime, deferred.field)
         else:
@@ -840,6 +843,9 @@
 
         This is where the recursion happens."""
 
+        if not self.using_viff_reactor:
+            return
+
         self.activation_counter += 1
 
         # setting the number to n makes the reactor called