+ActorImpl* ActorImpl::by_PID(aid_t PID)
+{
+ auto item = simix_global->process_list.find(PID);
+ if (item != simix_global->process_list.end())
+ return item->second;
+
+ // Search the trash
+ for (auto& a : simix_global->actors_to_destroy)
+ if (a.get_pid() == PID)
+ return &a;
+ return nullptr; // Not found, even in the trash
+}