From: Martin Quinson Date: Thu, 14 Mar 2019 21:03:15 +0000 (+0100) Subject: let the actor clean for itself X-Git-Tag: v3_22~94 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/10fa8a8eb7be70db4f1a68a53dd22f20681f7092 let the actor clean for itself --- diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index 728f23d402..37c1d13153 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -138,6 +138,12 @@ void ActorImpl::cleanup() XBT_DEBUG("Cleanup actor %s (%p), waiting synchro %p", get_cname(), this, waiting_synchro.get()); + /* Unregister from the kill timer if any */ + if (kill_timer != nullptr) { + kill_timer->remove(); + kill_timer = nullptr; + } + simix_global->mutex.lock(); simix_global->process_list.erase(pid_); diff --git a/src/kernel/context/Context.cpp b/src/kernel/context/Context.cpp index dc182b945f..bbbf5eb061 100644 --- a/src/kernel/context/Context.cpp +++ b/src/kernel/context/Context.cpp @@ -99,12 +99,6 @@ void Context::stop() simgrid::simix::simcall([this] { simgrid::s4u::Actor::on_destruction(actor_->iface()); - /* Unregister from the kill timer if any */ - if (actor_->kill_timer != nullptr) { - actor_->kill_timer->remove(); - actor_->kill_timer = nullptr; - } - actor_->cleanup(); }); this->iwannadie = true;