Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rely on template argument deduction (sonar, c++17).
[simgrid.git] / src / s4u / s4u_Mailbox.cpp
index d692395a97ed5729dbc740d3cade9ed71b33502c..fb6de6333274e5e71a360ca3189e3532d7f7bf5f 100644 (file)
@@ -135,8 +135,9 @@ Mailbox::iprobe(int type, const std::function<bool(void*, void*, kernel::activit
       [this, type, &match_fun, data] { return pimpl_->iprobe(type, match_fun, data); });
 }
 
-void Mailbox::clear() {
-  pimpl_->clear();
+void Mailbox::clear()
+{
+  kernel::actor::simcall_answered([this]() { this->pimpl_->clear(); });
 }
 
 } // namespace s4u