MailboxPtr Mailbox::byName(const char*name)
{
- simix::MailboxImpl* mbox = simix::MailboxImpl::byNameOrNull(name);
+ kernel::activity::MailboxImpl* mbox = kernel::activity::MailboxImpl::byNameOrNull(name);
if (mbox == nullptr) {
mbox = simix::kernelImmediate([name] {
- return simix::MailboxImpl::byNameOrCreate(name);
+ return kernel::activity::MailboxImpl::byNameOrCreate(name);
});
}
return MailboxPtr(&mbox->piface_, true);
}
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) */