Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix https://github.com/simgrid/simgrid/issues/294
[simgrid.git] / src / s4u / s4u_Comm.cpp
index bebc91b..1474137 100644 (file)
@@ -53,9 +53,8 @@ void Comm::wait_all(std::vector<CommPtr>* comms)
 {
   // TODO: this should be a simcall or something
   // TODO: we are missing a version with timeout
-  for (CommPtr comm : *comms) {
+  for (CommPtr comm : *comms)
     comm->wait();
-  }
 }
 
 Activity* Comm::set_rate(double rate)
@@ -133,7 +132,7 @@ Activity* Comm::start()
 /** @brief Block the calling actor until the communication is finished */
 Activity* Comm::wait()
 {
-  return this->wait(-1);
+  return this->wait_for(-1);
 }
 
 /** @brief Block the calling actor until the communication is finished, or until timeout
@@ -142,7 +141,7 @@ Activity* Comm::wait()
  *
  * @param timeout the amount of seconds to wait for the comm termination.
  *                Negative values denote infinite wait times. 0 as a timeout returns immediately. */
-Activity* Comm::wait(double timeout)
+Activity* Comm::wait_for(double timeout)
 {
   switch (state_) {
     case State::FINISHED: