Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Expose MailboxImpl::clear() to improve handling of node faults
authorFabien Chaix <chaix@ics.forth.gr>
Thu, 17 Mar 2022 17:59:07 +0000 (19:59 +0200)
committerFabien Chaix <chaix@ics.forth.gr>
Thu, 17 Mar 2022 17:59:07 +0000 (19:59 +0200)
include/simgrid/s4u/Mailbox.hpp
src/s4u/s4u_Mailbox.cpp

index fe9f875..d48166d 100644 (file)
@@ -124,6 +124,9 @@ public:
   /** Blocking data reception with timeout */
   template <typename T> T* get(double timeout);
   template <typename T> std::unique_ptr<T> get_unique(double timeout) { return std::unique_ptr<T>(get<T>(timeout)); }
+
+  void clear();
+  
 };
 
 template <typename T> CommPtr Mailbox::get_async(T** data)
index a0c99e5..d692395 100644 (file)
@@ -134,6 +134,11 @@ Mailbox::iprobe(int type, const std::function<bool(void*, void*, kernel::activit
   return kernel::actor::simcall_answered(
       [this, type, &match_fun, data] { return pimpl_->iprobe(type, match_fun, data); });
 }
+
+void Mailbox::clear() {
+  pimpl_->clear();
+}
+
 } // namespace s4u
 } // namespace simgrid