A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
suggested solution tu use simix through a function
[simgrid.git]
/
examples
/
s4u
/
actor-yield
/
s4u-actor-yield.cpp
diff --git
a/examples/s4u/actor-yield/s4u-actor-yield.cpp
b/examples/s4u/actor-yield/s4u-actor-yield.cpp
index
b5a5d92
..
6e79dc6
100644
(file)
--- a/
examples/s4u/actor-yield/s4u-actor-yield.cpp
+++ b/
examples/s4u/actor-yield/s4u-actor-yield.cpp
@@
-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);
}
};