Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
asyc-waitall is converted
authorTakishipp <toufik.boubehziz@gmail.com>
Wed, 6 Sep 2017 10:59:38 +0000 (12:59 +0200)
committerTakishipp <toufik.boubehziz@gmail.com>
Wed, 6 Sep 2017 10:59:38 +0000 (12:59 +0200)
examples/s4u/async-waitall/s4u_async-waitall.cpp

index a3ac331..c4bbe9e 100644 (file)
@@ -69,15 +69,12 @@ public:
     received = NULL;
     simgrid::s4u::CommPtr comm = mbox->get_async(&received);
     comm->wait();
-    if (strcmp(received, "finalize") == 0) {
-      delete received;
+    std::string* receivedStr = static_cast<std::string*>(received);
+    if (receivedStr->compare("finalize") == 0) {
+      delete receivedStr;
       break;
     }
 
-    XBT_INFO("Processing \"%s\"", received);
-    // MSG_task_execute(task);
-    XBT_INFO("\"%s\" done", recieved);
-    delete recieved;
   }
   XBT_INFO("I'm done. See you!");
 }