Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make all Activity starts vetoable
[simgrid.git] / examples / cpp / exec-unassigned / s4u-exec-unassigned.cpp
index 58deb3e..054f81d 100644 (file)
@@ -14,8 +14,8 @@ static void worker()
   // Define an amount of work that should take 1 second to execute.
   double computation_amount = sg4::this_actor::get_host()->get_speed();
 
-  // Create an unassigned activity and start it
-  sg4::ExecPtr exec = sg4::Exec::init()->set_flops_amount(computation_amount)->set_name("exec")->vetoable_start();
+  // Create an unassigned activity and start it. It will not actually start, because it's not assigned to any host yet
+  sg4::ExecPtr exec = sg4::Exec::init()->set_flops_amount(computation_amount)->set_name("exec")->start();
 
   // Wait for a while
   sg4::this_actor::sleep_for(10);