changeset 1214:34a7d23462a7

Get rid of increment_pc for broadcast.
author Martin Geisler <mg@cs.au.dk>
date Fri, 18 Sep 2009 14:43:01 +0200
parents 7610deb0ebab
children f2fce145b9e1
files viff/active.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/viff/active.py	Fri Sep 18 14:42:26 2009 +0200
+++ b/viff/active.py	Fri Sep 18 14:43:01 2009 +0200
@@ -27,7 +27,7 @@
 from viff.util import rand
 from viff.matrix import Matrix, hyper
 from viff.passive import PassiveRuntime
-from viff.runtime import Share, increment_pc, preprocess, gather_shares
+from viff.runtime import Share, preprocess, gather_shares
 from viff.runtime import ECHO, READY, SEND
 
 
@@ -37,7 +37,6 @@
     broadcast.
     """
 
-    @increment_pc
     def _broadcast(self, sender, message=None):
         """Perform a Bracha broadcast.
 
@@ -47,6 +46,8 @@
         protocol" by G. Bracha in Proc. 3rd ACM Symposium on
         Principles of Distributed Computing, 1984, pages 154-162.
         """
+        # We need a unique program counter for each call.
+        self.program_counter[-1] += 1
 
         result = Deferred()
         pc = tuple(self.program_counter)