Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s4u: test what happens when we kill a newborn actor (seems to work)
[simgrid.git] / examples / s4u / actor-kill / s4u-actor-kill.cpp
index 3663640..51c90b6 100644 (file)
@@ -52,6 +52,13 @@ static void killer()
 
   simgrid::s4u::this_actor::sleep_for(1);
 
+  XBT_INFO("Start a new actor, and kill it right away");
+  simgrid::s4u::ActorPtr victimC =
+      simgrid::s4u::Actor::createActor("victim C", simgrid::s4u::Host::by_name("Jupiter"), victimA_fun);
+  victimC->kill();
+
+  simgrid::s4u::this_actor::sleep_for(1);
+
   XBT_INFO("Killing everybody but myself");
   simgrid::s4u::Actor::killAll();
 
@@ -72,7 +79,5 @@ int main(int argc, char* argv[])
 
   e.run(); /* - Run the simulation */
 
-  XBT_INFO("Simulation time %g", e.getClock());
-
   return 0;
 }