Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args):
# sys.exit(1); simgrid.info("Exiting now (done sleeping or got killed)."))
this_actor.on_exit(lambda: print("BAAA"))
def victim_a_fun():
this_actor.on_exit(lambda: this_actor.info("I have been killed!"))
this_actor.info("Hello!")
this_actor.info("Suspending myself")
this_actor.suspend() # - Start by suspending itself
# - Then is resumed and start to execute a task
this_actor.info("OK, OK. Let's work")
this_actor.execute(1e9)
# - But will never reach the end of it
this_actor.info("Bye!")