Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s4u::Exec::wait(): start the tasks on need
[simgrid.git] / src / s4u / s4u_Exec.cpp
index 5f1d222..c864b65 100644 (file)
@@ -32,6 +32,8 @@ Activity* Exec::cancel()
 
 Activity* Exec::wait()
 {
+  if (state_ == State::INITED)
+    start();
   simcall_execution_wait(pimpl_);
   state_ = State::FINISHED;
   on_completion(Actor::self());