From: Martin Quinson Date: Fri, 20 Jul 2018 11:16:42 +0000 (+0200) Subject: Call ExecImpl::on_completion() before starting to destroy it X-Git-Tag: v3_21~377^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b468c99043663686aeeb0912a43b6a8c4a1d684b?hp=d53e30ea4f655ad7aae70e6480080bb60a7efe54 Call ExecImpl::on_completion() before starting to destroy it --- diff --git a/src/kernel/activity/ExecImpl.cpp b/src/kernel/activity/ExecImpl.cpp index 9cb7149ab2..dc7dad509e 100644 --- a/src/kernel/activity/ExecImpl.cpp +++ b/src/kernel/activity/ExecImpl.cpp @@ -102,6 +102,8 @@ void simgrid::kernel::activity::ExecImpl::post() state_ = SIMIX_DONE; } + on_completion(this); + if (surf_action_) { surf_action_->unref(); surf_action_ = nullptr; @@ -111,7 +113,6 @@ void simgrid::kernel::activity::ExecImpl::post() timeout_detector_ = nullptr; } - on_completion(this); /* If there are simcalls associated with the synchro, then answer them */ if (not simcalls_.empty()) SIMIX_execution_finish(this);