X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/36e27f6d333bc0d2664f25bb8a9c243a6d1f682d..6422dfed0cfd685d9e99129e0cd0505ac913c4f3:/teshsuite/s4u/cloud-two-execs/cloud-two-execs.cpp diff --git a/teshsuite/s4u/cloud-two-execs/cloud-two-execs.cpp b/teshsuite/s4u/cloud-two-execs/cloud-two-execs.cpp index 9f9196d28c..1f5f198dea 100644 --- a/teshsuite/s4u/cloud-two-execs/cloud-two-execs.cpp +++ b/teshsuite/s4u/cloud-two-execs/cloud-two-execs.cpp @@ -7,9 +7,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this example"); -simgrid::s4u::ExecPtr exec; - -static void computation_fun() +static void computation_fun(simgrid::s4u::ExecPtr& exec) { const char* pr_name = simgrid::s4u::this_actor::get_cname(); const char* host_name = simgrid::s4u::Host::current()->get_cname(); @@ -37,7 +35,8 @@ static void master_main() auto* vm0 = pm0->create_vm("VM0", 1); vm0->start(); - simgrid::s4u::Actor::create("compute", vm0, computation_fun); + simgrid::s4u::ExecPtr exec; + simgrid::s4u::Actor::create("compute", vm0, computation_fun, std::ref(exec)); while (simgrid::s4u::Engine::get_clock() < 100) { if (exec)