Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 19 Feb 2020 14:02:13 +0000 (15:02 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 21 Feb 2020 14:11:23 +0000 (15:11 +0100)
src/kernel/actor/ActorImpl.cpp

index 2b96c7d..c42198b 100644 (file)
@@ -235,9 +235,12 @@ void ActorImpl::kill(ActorImpl* actor)
 
   actor->exit();
 
-  if (std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), actor) ==
-          end(simix_global->actors_to_run) &&
-      actor != this) {
+  if (actor == this) {
+    XBT_DEBUG("Go on, this is a suicide,");
+  } else if (std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), actor) !=
+             end(simix_global->actors_to_run)) {
+    XBT_DEBUG("Actor %s is already in the to_run list", actor->get_cname());
+  } else {
     XBT_DEBUG("Inserting %s in the to_run list", actor->get_cname());
     simix_global->actors_to_run.push_back(actor);
   }