X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/50315369ab3f6921a3c6c6a266cf1d25b9c56b4d..d636f4a9dfd4005a73f8d9e0c393c8b3d849a2ad:/examples/python/task-io/task-io.py diff --git a/examples/python/task-io/task-io.py b/examples/python/task-io/task-io.py index 18a4cb2aac..4db1456ded 100644 --- a/examples/python/task-io/task-io.py +++ b/examples/python/task-io/task-io.py @@ -17,14 +17,13 @@ def parse(): ) return parser.parse_args() -def callback( t): - print(f'[{Engine.clock}] { t} finished ({ t.count})') +def callback(t): + print(f'[{Engine.clock}] {t} finished ({t.count})') if __name__ == '__main__': args = parse() e = Engine(sys.argv) e.load_platform(args.platform) - Task.init() # Retrieve hosts bob = e.host_by_name('bob') @@ -42,10 +41,10 @@ if __name__ == '__main__': read.add_successor(exec2) # Add a function to be called when tasks end for log purpose - Task.on_end_cb(callback) + Task.on_completion_cb(callback) # Enqueue two executions for task exec1 exec1.enqueue_execs(2) # runs the simulation - e.run() \ No newline at end of file + e.run()