X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/85ec20d003755c203949f738568940c30e3159de..9f2dfd25486ba89c4adaa54d774092c0b9756361:/src/kernel/activity/CommImpl.cpp diff --git a/src/kernel/activity/CommImpl.cpp b/src/kernel/activity/CommImpl.cpp index 7a9ef042b5..3abb315c8c 100644 --- a/src/kernel/activity/CommImpl.cpp +++ b/src/kernel/activity/CommImpl.cpp @@ -20,8 +20,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_network, kernel, "Kernel network-related synchronization"); namespace simgrid::kernel::activity { -xbt::signal CommImpl::on_start; -xbt::signal CommImpl::on_completion; std::function CommImpl::copy_data_callback_ = [](kernel::activity::CommImpl* comm, void* buff, size_t buff_size) { @@ -470,7 +468,12 @@ void CommImpl::finish() XBT_DEBUG("CommImpl::finish() comm %p, state %s, src_proc %p, dst_proc %p, detached: %d", this, get_state_str(), src_actor_.get(), dst_actor_.get(), detached_); - s4u::Comm::on_completion(static_cast(*this->get_iface())); + if (get_iface()) { + const auto& piface = static_cast(*get_iface()); + s4u::Comm::on_completion(piface); + if (not MC_is_active()) // MC doesn't like when we access user interface from the kernel. + piface.on_this_completion(piface); + } /* Update synchro state */ if (src_timeout_ && src_timeout_->get_state() == resource::Action::State::FINISHED)