X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0921a44d5521b3337b8752aa2a9f06ee1405fb24..8250fdfeb9c8dd3ae2a1d19f3c89871c9599d0f8:/src/s4u/s4u_mailbox.cpp diff --git a/src/s4u/s4u_mailbox.cpp b/src/s4u/s4u_mailbox.cpp index 9e5f3f4c9c..ed78c0338c 100644 --- a/src/s4u/s4u_mailbox.cpp +++ b/src/s4u/s4u_mailbox.cpp @@ -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) */