Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
late modification wasn't tested, former was better
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 17 Feb 2019 22:57:07 +0000 (23:57 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sun, 17 Feb 2019 22:57:07 +0000 (23:57 +0100)
src/kernel/context/Context.cpp
src/simix/ActorImpl.cpp

index 1a51d04..44f2383 100644 (file)
@@ -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] {
index 4637cc3..850e828 100644 (file)
@@ -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();