When **communicating**, data is not directly sent to other actors but
posted onto a |Mailbox|_ that serve as rendez-vous point between
communicating actors. This means that you don't need to know who you
-are talking to, you just put your communication `Send` request in a
-mailbox, and it will be matched with a complementary `Receive`
+are talking to, you just put your communication `Put` request in a
+mailbox, and it will be matched with a complementary `Get`
request. Alternatively, actors can interact through **classical
synchronization mechanisms** such as |Barrier|_, |Semaphore|_,
|Mutex|_ and |ConditionVariable|_.
.. literalinclude:: ../../examples/s4u/async-waitall/s4u-async-waitall.cpp
:language: c++
- :start-after: send-begin
- :end-before: send-end
+ :start-after: put-begin
+ :end-before: put-end
:dedent: 4
pending_comms.push_back(comm);
}
- /* Start sending messages to let the workers know that they should stop */ // sphinx-doc: send-begin
+ /* Start sending messages to let the workers know that they should stop */ // sphinx-doc: put-begin
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);
/* Now that all message exchanges were initiated, wait for their completion in one single call */
simgrid::s4u::Comm::wait_all(&pending_comms);
- // sphinx-doc: send-end
+ // sphinx-doc: put-end
XBT_INFO("Goodbye now!");
}