From: Frederic Suter Date: Sun, 17 Feb 2019 22:57:07 +0000 (+0100) Subject: late modification wasn't tested, former was better X-Git-Tag: v3_22~314 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ca9a033421bed9944ee0412aa1341e584a0d9010?ds=inline late modification wasn't tested, former was better --- diff --git a/src/kernel/context/Context.cpp b/src/kernel/context/Context.cpp index 1a51d042ed..44f2383bbd 100644 --- a/src/kernel/context/Context.cpp +++ b/src/kernel/context/Context.cpp @@ -93,8 +93,7 @@ void Context::stop() XBT_DEBUG("%s@%s(%ld) should not run anymore", actor_->get_cname(), actor_->iface()->get_host()->get_cname(), actor_->get_pid()); - if (this->actor_ == simix_global->maestro_process) /* Do not cleanup maestro */ - this->actor_->cleanup(); + this->actor_->cleanup(); this->iwannadie = false; // don't let the simcall's yield() do a Context::stop(), because that's me simgrid::simix::simcall([this] { diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index 4637cc3ab1..850e828c54 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -67,6 +67,9 @@ ActorImpl::~ActorImpl() void ActorImpl::cleanup() { + if (this == simix_global->maestro_process) /* Do not cleanup maestro */ + return; + XBT_DEBUG("Cleanup actor %s (%p), waiting synchro %p", get_cname(), this, waiting_synchro.get()); simix_global->mutex.lock();