+ /* two actors may have pushed the same mbox_create simcall at the same time */
+ kernel::activity::MailboxImpl* mbox = kernel::actor::simcall_answered([&name, this] {
+ auto [m, inserted] = pimpl->mailboxes_.try_emplace(name, nullptr);
+ if (inserted) {
+ m->second = new kernel::activity::MailboxImpl(name);
+ XBT_DEBUG("Creating a mailbox at %p with name %s", m->second, name.c_str());
+ }
+ return m->second;
+ });
+ return mbox->get_iface();