* It can also be used to benchmark our context-switching mechanism.
*/
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor_yield, "Messages specific for this s4u example");
-/* Main function of the Yielder process */
+/* Main function of the Yielder actor */
class yielder {
long number_of_yields;
public:
explicit yielder(std::vector<std::string> args) { number_of_yields = std::stod(args[1]); }
- void operator()()
+ void operator()() const
{
for (int i = 0; i < number_of_yields; i++)
simgrid::s4u::this_actor::yield();