]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/s4u/wait-any-for/wait-any-for.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add memset(0) for shared calloc.
[simgrid.git] / teshsuite / s4u / wait-any-for / wait-any-for.cpp
index a206d6a5d0264cbcb2fb37e8899bd75dc977e6a2..7f40e7f0d63c1338fa42899fba0f56c975c84651 100644 (file)
@@ -16,16 +16,16 @@ static void worker()
   auto put1 = mbox->put_async(&input1, 1000 * 1000 * 500);
   auto put2 = mbox->put_async(&input2, 1000 * 1000 * 1000);
 
-  int * out1;
-  auto get1 = mbox->get_async((void**)&out1);
+  int* out1;
+  auto get1 = mbox->get_async<int>(&out1);
 
-  int * out2;
-  auto get2 = mbox->get_async((void**)&out2);
+  int* out2;
+  auto get2 = mbox->get_async<int>(&out2);
 
   XBT_INFO("All comms have started");
   std::vector<simgrid::s4u::CommPtr> comms = {put1, put2, get1, get2};
 
-  while (!comms.empty()) {
+  while (not comms.empty()) {
     int index = simgrid::s4u::Comm::wait_any_for(&comms, 0.5);
     if (index < 0)
       XBT_INFO("wait_any_for: Timeout reached");