- simgrid::s4u::this_actor::sleep_for(10);
- XBT_INFO("Results is -> %d", result);
-}
+ /* Create the requested amount of actors pairs. Each pair has a specific mutex and cell in `result`. */
+ std::vector<int> result(cfg_actor_count.get());
+
+ for (int i = 0; i < cfg_actor_count; i++) {
+ sg4::MutexPtr mutex = sg4::Mutex::create();
+ sg4::Actor::create("worker", sg4::Host::by_name("Jupiter"), workerScopedLock, mutex, std::ref(result[i]));
+ sg4::Actor::create("worker", sg4::Host::by_name("Tremblay"), worker, mutex, std::ref(result[i]));
+ }