- /* Create a communication representing the ongoing communication, and store it in pending_comms */
- simgrid::s4u::CommPtr comm = mboxes[i % receivers_count]->put_async(payload, msg_size);
- pending_comms.push_back(comm);
- }
-
- /* Start sending messages to let the workers know that they should stop */
- for (int i = 0; i < receivers_count; i++) {
- XBT_INFO("Send 'finalize' to 'receiver-%d'", i);
- simgrid::s4u::CommPtr comm = mboxes[i]->put_async(new std::string("finalize"), 0);
- pending_comms.push_back(comm);
- }
- XBT_INFO("Done dispatching all messages");
+ /* Create a communication representing the ongoing communication and then */
+ simgrid::s4u::CommPtr comm = mbox->put_async(payload, msg_size);