From: Fabien Chaix Date: Thu, 17 Mar 2022 17:59:07 +0000 (+0200) Subject: Expose MailboxImpl::clear() to improve handling of node faults X-Git-Tag: v3.32~361^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fff9fbf510e8ac37ddb3bb622453d8b598806adf Expose MailboxImpl::clear() to improve handling of node faults --- diff --git a/include/simgrid/s4u/Mailbox.hpp b/include/simgrid/s4u/Mailbox.hpp index fe9f875eca..d48166dfe3 100644 --- a/include/simgrid/s4u/Mailbox.hpp +++ b/include/simgrid/s4u/Mailbox.hpp @@ -124,6 +124,9 @@ public: /** Blocking data reception with timeout */ template T* get(double timeout); template std::unique_ptr get_unique(double timeout) { return std::unique_ptr(get(timeout)); } + + void clear(); + }; template CommPtr Mailbox::get_async(T** data) diff --git a/src/s4u/s4u_Mailbox.cpp b/src/s4u/s4u_Mailbox.cpp index a0c99e5832..d692395a97 100644 --- a/src/s4u/s4u_Mailbox.cpp +++ b/src/s4u/s4u_Mailbox.cpp @@ -134,6 +134,11 @@ Mailbox::iprobe(int type, const std::functioniprobe(type, match_fun, data); }); } + +void Mailbox::clear() { + pimpl_->clear(); +} + } // namespace s4u } // namespace simgrid