viff

changeset 1058:806148d6146f

Document the synchronize method.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 16 Dec 2008 13:21:22 +0100
parents 8bb853b24714
children 476bac16b2d9
files viff/runtime.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/viff/runtime.py	Tue Dec 16 13:21:18 2008 +0100
     1.2 +++ b/viff/runtime.py	Tue Dec 16 13:21:22 2008 +0100
     1.3 @@ -574,6 +574,13 @@
     1.4  
     1.5      @increment_pc
     1.6      def synchronize(self):
     1.7 +        """Introduce a synchronization point.
     1.8 +
     1.9 +        Returns a :class:`Deferred` which will trigger if and when all
    1.10 +        other players have made their calls to :meth:`synchronize`. By
    1.11 +        adding callbacks to the returned :class:`Deferred`, one can
    1.12 +        divide a protocol execution into disjoint phases.
    1.13 +        """
    1.14          shares = [self._exchange_shares(player, GF256(0))
    1.15                    for player in self.players]
    1.16          result = gather_shares(shares)