Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix on_exit callback for python/actor-lifetime.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 23 Jan 2020 10:02:08 +0000 (11:02 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 23 Jan 2020 10:06:27 +0000 (11:06 +0100)
The test is still failing.

examples/python/actor-lifetime/actor-lifetime.py

index cb5ce72..8a11d06 100644 (file)
@@ -14,8 +14,7 @@ class Sleeper:
     """This actor just sleeps until termination"""
 
     def __init__(self, *args):
-        # sys.exit(1); simgrid.info("Exiting now (done sleeping or got killed)."))
-        this_actor.on_exit(lambda: print("BAAA"))
+        this_actor.on_exit(lambda: this_actor.info("Exiting now (done sleeping or got killed)."))
 
     def __call__(self):
         this_actor.info("Hello! I go to sleep.")