From: Frederic Suter Date: Mon, 8 Apr 2019 11:49:51 +0000 (+0200) Subject: further simplify throw_exception X-Git-Tag: v3.22.2~159 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/db7c1345d9a12b8ffd8e04888e2a9e657d129db0 further simplify throw_exception --- diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index 5cea62caab..636f054f17 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -416,23 +416,12 @@ void ActorImpl::throw_exception(std::exception_ptr e) waiting_synchro->cancel(); activity::CommImplPtr comm = boost::dynamic_pointer_cast(waiting_synchro); - activity::SleepImplPtr sleep = boost::dynamic_pointer_cast(waiting_synchro); - if (comm != nullptr) { + if (comm != nullptr) comms.remove(comm); - } - if (sleep != nullptr) { - if (std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), this) == - end(simix_global->actors_to_run) && - this != SIMIX_process_self()) { - XBT_DEBUG("Inserting [%p] %s in the to_run list", this, get_cname()); - simix_global->actors_to_run.push_back(this); - } - } + waiting_synchro = nullptr; } - - waiting_synchro = nullptr; } void ActorImpl::set_host(s4u::Host* dest)