Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
finish the conversion C++ of simix::MailboxImpl
[simgrid.git] / src / s4u / s4u_mailbox.cpp
index 9e5f3f4..ed78c03 100644 (file)
@@ -47,7 +47,9 @@ smx_activity_t Mailbox::front()
 }
 
 void Mailbox::setReceiver(ActorPtr actor) {
-  simcall_mbox_set_receiver(pimpl_, actor == nullptr ? nullptr : actor->pimpl_);
+  simix::kernelImmediate([this, actor]() {
+    this->pimpl_->setReceiver(actor);
+  });
 }
 
 /** @brief get the receiver (process associated to the mailbox) */