Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / examples / python / exec-async / exec-async.py
index 07585437a36e6640a4f2046c4e832a105414dc05..5892dca6ea366f565780cd0679af5991b4d327b7 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2018-2022. The SimGrid Team. All rights reserved.
+# Copyright (c) 2018-2023. The SimGrid Team. All rights reserved.
 #
 # This program is free software you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
@@ -50,7 +50,7 @@ class Canceller:
     def __call__(self):
         computation_amount = this_actor.get_host().speed
         this_actor.info("Canceller executes {:.0f} flops, should take 1 second.".format(computation_amount))
-        activity = this_actor.exec_init(computation_amount).start()
+        activity = this_actor.exec_async(computation_amount)
 
         this_actor.sleep_for(0.5)
         this_actor.info("I changed my mind, cancel!")