X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f6344fd846b7af9570a016a0d346a94c5a27cea9..ed6dd6d6767dcd55696f847b7436ff28f9dbd664:/src/kernel/EngineImpl.cpp diff --git a/src/kernel/EngineImpl.cpp b/src/kernel/EngineImpl.cpp index 686871d395..39f49ee81b 100644 --- a/src/kernel/EngineImpl.cpp +++ b/src/kernel/EngineImpl.cpp @@ -453,6 +453,10 @@ void EngineImpl::run_all_actors() { instance_->get_context_factory()->run_all(); + for (auto const& actor : actors_to_run_) + if (actor->context_->to_be_freed()) + actor->cleanup_from_kernel(); + actors_to_run_.swap(actors_that_ran_); actors_to_run_.clear(); } @@ -687,6 +691,15 @@ void EngineImpl::run(double max_date) { seal_platform(); + if (MC_is_active()) { +#if SIMGRID_HAVE_MC + mc::AppSide::get()->main_loop(); +#else + xbt_die("MC_is_active() is not supposed to return true in non-MC settings"); +#endif + THROW_IMPOSSIBLE; // main_loop never returns + } + if (MC_record_replay_is_active()) { mc::RecordTrace::replay(MC_record_path()); empty_trash();