Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix remaining links to pls_ns3.
[simgrid.git] / examples / s4u / actor-exiting / s4u-actor-exiting.cpp
index ac5042d..64cd981 100644 (file)
@@ -32,7 +32,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_exiting, "Messages specific for this s4u
 static void actor_a()
 {
   // Register a lambda function to be executed once it stops
-  simgrid::s4u::this_actor::on_exit([](int, void*) { XBT_INFO("I stop now"); }, nullptr);
+  simgrid::s4u::this_actor::on_exit([](bool /*failed*/) { XBT_INFO("I stop now"); });
 
   simgrid::s4u::this_actor::execute(1e9);
 }
@@ -45,13 +45,13 @@ static void actor_b()
 int main(int argc, char* argv[])
 {
   simgrid::s4u::Engine e(&argc, argv);
-  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
+  xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s ../platforms/small_platform.xml\n", argv[0], argv[0]);
 
   e.load_platform(argv[1]); /* - Load the platform description */
 
   /* Register a callback in the Actor::on_destruction signal. It will be called for every terminated actors */
   simgrid::s4u::Actor::on_destruction.connect(
-      [](simgrid::s4u::ActorPtr actor) { XBT_INFO("Actor %s stops now", actor->get_cname()); });
+      [](simgrid::s4u::Actor const& actor) { XBT_INFO("Actor %s stops now", actor.get_cname()); });
 
   /* Create some actors */
   simgrid::s4u::Actor::create("A", simgrid::s4u::Host::by_name("Tremblay"), actor_a);