X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f8b3dd62a8a5d07757ba14daad3846b4871d3cc3..40ee10e13b61bfb28374d96ade010a262b5abd44:/include/simgrid/s4u/Mailbox.hpp diff --git a/include/simgrid/s4u/Mailbox.hpp b/include/simgrid/s4u/Mailbox.hpp index 3c910f6632..b8eddff976 100644 --- a/include/simgrid/s4u/Mailbox.hpp +++ b/include/simgrid/s4u/Mailbox.hpp @@ -14,8 +14,7 @@ #include #include -namespace simgrid { -namespace s4u { +namespace simgrid::s4u { /** @brief Mailboxes: Network rendez-vous points. */ class XBT_PUBLIC Mailbox { @@ -39,7 +38,7 @@ public: /** @brief Retrieves the name of that mailbox as a C string */ const char* get_cname() const; - /** Retrieve the mailbox associated to the given name. Mailboxes are created on demand. */ + /** \static Retrieve the mailbox associated to the given name. Mailboxes are created on demand. */ static Mailbox* by_name(const std::string& name); /** Returns whether the mailbox contains queued communications */ @@ -119,6 +118,9 @@ public: CommPtr get_init(); /** Creates and start an async data reception to that mailbox */ template CommPtr get_async(T** data); + /** Creates and start an async data reception to that mailbox. Since the data location is not provided, you'll have to + * use Comm::get_payload once the comm terminates */ + CommPtr get_async(); /** Blocking data reception */ template T* get(); @@ -134,7 +136,7 @@ public: template CommPtr Mailbox::get_async(T** data) { CommPtr res = get_init()->set_dst_data(reinterpret_cast(data), sizeof(void*)); - res->vetoable_start(); + res->start(); return res; } @@ -151,7 +153,6 @@ template T* Mailbox::get(double timeout) get_async(&res)->wait_for(timeout); return res; } -} // namespace s4u -} // namespace simgrid +} // namespace simgrid::s4u #endif /* SIMGRID_S4U_MAILBOX_HPP */