X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a882344bc908a258a991701e226556ec23fd7cd6..039807fd1fb02afb72365fe19a6ad620d1bbf4c7:/examples/python/comm-waituntil/comm-waituntil.py diff --git a/examples/python/comm-waituntil/comm-waituntil.py b/examples/python/comm-waituntil/comm-waituntil.py index 0209dc86a1..0f2bdf8362 100644 --- a/examples/python/comm-waituntil/comm-waituntil.py +++ b/examples/python/comm-waituntil/comm-waituntil.py @@ -1,9 +1,9 @@ -# Copyright (c) 2010-2022. The SimGrid Team. All rights reserved. +# Copyright (c) 2010-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. -""" This example shows how to suspend and resume an asynchronous communication. +""" This example demonstrates Comm.wait_for() and Comm.wait_until to set timeouts on waits. """ from argparse import ArgumentParser @@ -47,7 +47,7 @@ def sender(receiver_mailbox: Mailbox, messages_count: int, payload_size: int): # Now that all message exchanges were initiated, wait for their completion, in order of creation while pending_comms: comm = pending_comms[-1] - comm.wait_until(Engine.clock + 1) + comm.wait_until(Engine.clock + 1) # same as: current_comm.wait_for(1.0) pending_comms.pop() # remove it from the list this_actor.info("Goodbye now!")