viff

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 diff
     1.1 --- a/viff/active.py	Fri Sep 18 14:42:26 2009 +0200
     1.2 +++ b/viff/active.py	Fri Sep 18 14:43:01 2009 +0200
     1.3 @@ -27,7 +27,7 @@
     1.4  from viff.util import rand
     1.5  from viff.matrix import Matrix, hyper
     1.6  from viff.passive import PassiveRuntime
     1.7 -from viff.runtime import Share, increment_pc, preprocess, gather_shares
     1.8 +from viff.runtime import Share, preprocess, gather_shares
     1.9  from viff.runtime import ECHO, READY, SEND
    1.10  
    1.11  
    1.12 @@ -37,7 +37,6 @@
    1.13      broadcast.
    1.14      """
    1.15  
    1.16 -    @increment_pc
    1.17      def _broadcast(self, sender, message=None):
    1.18          """Perform a Bracha broadcast.
    1.19  
    1.20 @@ -47,6 +46,8 @@
    1.21          protocol" by G. Bracha in Proc. 3rd ACM Symposium on
    1.22          Principles of Distributed Computing, 1984, pages 154-162.
    1.23          """
    1.24 +        # We need a unique program counter for each call.
    1.25 +        self.program_counter[-1] += 1
    1.26  
    1.27          result = Deferred()
    1.28          pc = tuple(self.program_counter)