Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer a reference for first parameter of {test,wait}_{all,any}.
[simgrid.git] / examples / cpp / comm-waitany / s4u-comm-waitany.cpp
index e8f20ae..fa8b117 100644 (file)
@@ -77,7 +77,7 @@ public:
      * Even in this simple example, the pending comms do not terminate in the exact same order of creation.
      */
     while (not pending_comms.empty()) {
-      int changed_pos = sg4::Comm::wait_any(&pending_comms);
+      int changed_pos = sg4::Comm::wait_any(pending_comms);
       pending_comms.erase(pending_comms.begin() + changed_pos);
       if (changed_pos != 0)
         XBT_INFO("Remove the %dth pending comm: it terminated earlier than another comm that was initiated first.",