Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Uniformize get_impl(): const attribute, and return raw pointer.
[simgrid.git] / examples / python / actor-create / actor-create.py
index 3f43906..2c03dfa 100644 (file)
@@ -59,10 +59,12 @@ class Sender:
     Later, this actor class is instantiated twice in the simulation.
     """
 
-    def __init__(self, msg = "GaBuZoMeu", mbox = "mb42"):
+    def __init__(self, msg="GaBuZoMeu", mbox="mb42"):
         self.msg = msg
         self.mbox = mbox
 
+    # Actors that are created as object will execute their __call__ method.
+    # So, the following constitutes the main function of the Sender actor.
     def __call__(self):
         this_actor.info("Hello s4u, I have something to send")
         mailbox = Mailbox.by_name(self.mbox)