-# Copyright (c) 2010-2019. The SimGrid Team. All rights reserved.
+# Copyright (c) 2010-2020. 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.
+from simgrid import Comm, Engine, Mailbox, this_actor
import sys
-from simgrid import *
# This example shows how to block on the completion of a set of communications.
#
# As for the other asynchronous examples, the sender initiate all the messages it wants to send and
-# pack the resulting simgrid::s4u::CommPtr objects in a vector. All messages thus occurs concurrently.
+# pack the resulting simgrid.Comm objects in a list. All messages thus occur concurrently.
#
# The sender then blocks until all ongoing communication terminate, using simgrid.Comm.wait_all()
this_actor.info("Done dispatching all messages")
# Now that all message exchanges were initiated, wait for their completion in one single call
- Comm.waitall(pending_comms)
+ Comm.wait_all(pending_comms)
this_actor.info("Goodbye now!")