Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
suggested solution tu use simix through a function
[simgrid.git] / examples / s4u / actor-yield / s4u-actor-yield.cpp
index b5a5d92..6e79dc6 100644 (file)
@@ -28,8 +28,9 @@ public:
 }
 void operator()()
 {
+ simgrid::s4u::ActorPtr actor;
  for (int i = 0; i < number_of_yields; i++)
simgrid::simix::kernelImmediate([] { /* do nothing*/ });
actor->yield();
  XBT_INFO("I yielded %ld times. Goodbye now!", number_of_yields);
 }
 };