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 wrap: on
line diff
--- a/viff/runtime.py	Tue Dec 16 13:21:18 2008 +0100
+++ b/viff/runtime.py	Tue Dec 16 13:21:22 2008 +0100
@@ -574,6 +574,13 @@
 
     @increment_pc
     def synchronize(self):
+        """Introduce a synchronization point.
+
+        Returns a :class:`Deferred` which will trigger if and when all
+        other players have made their calls to :meth:`synchronize`. By
+        adding callbacks to the returned :class:`Deferred`, one can
+        divide a protocol execution into disjoint phases.
+        """
         shares = [self._exchange_shares(player, GF256(0))
                   for player in self.players]
         result = gather_shares(shares)