]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/actor/ActorImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove bmf host model. Add it as an option.
[simgrid.git] / src / kernel / actor / ActorImpl.cpp
index e0129d47e78326443b623afecf97300df56fc11f..ef37508256cc9e9cd4844003a2894a1313a2995a 100644 (file)
@@ -48,7 +48,7 @@ unsigned long* get_maxpid_addr()
 {
   return &maxpid;
 }
-ActorIDTrait::ActorIDTrait(std::string name, aid_t ppid) : name_(std::move(name)), pid_(maxpid++), ppid_(ppid) {}
+ActorIDTrait::ActorIDTrait(const std::string& name, aid_t ppid) : name_(name), pid_(maxpid++), ppid_(ppid) {}
 
 ActorImpl* ActorImpl::self()
 {
@@ -194,8 +194,9 @@ void ActorImpl::cleanup_from_self()
     simcall_.timeout_cb_ = nullptr;
   }
 
-  set_wannadie(false); // don't let the simcall's yield() do a Context::stop(), to avoid infinite loops
-  actor::simcall_answered([] {}); // This empty callback is mandatory even if it drives me nuts.
+  /* maybe the actor was killed during a simcall, reset its observer */
+  simcall_.observer_ = nullptr;
+
   set_wannadie();
 }