Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Lame attempt to hide problems on Jenkins.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 21 Mar 2019 08:23:06 +0000 (09:23 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 21 Mar 2019 08:23:06 +0000 (09:23 +0100)
examples/python/async-wait/async-wait.py

index 2d6d549..39ab1ea 100644 (file)
@@ -60,9 +60,11 @@ class Receiver:
     def __init__(self, *args):
         if len(args) != 1:  # Receiver actor expects 1 argument: its ID
             raise AssertionError("Actor receiver requires 1 parameter, but got {:d}".format(len(args)))
-        self.mbox = Mailbox.by_name("receiver-{:s}".format(args[0]))
+        self.id = int(args[0])
 
     def __call__(self):
+        # FIXME: It should be ok to initialize self.mbox from __init__, but it's currently failing on the OS X Jenkins slave.
+        self.mbox = Mailbox.by_name("receiver-{:d}".format(self.id))
         this_actor.info("Wait for my first message")
         while True:
             received = self.mbox.get()