]> AND Private Git Repository - loba.git/blobdiff - communicator.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Spell sig_atomic_t as std::sig_atomic_t.
[loba.git] / communicator.cpp
index 7abdf763a175aded0947ef48f88cdccb9dfe8b95..867d19eb36f1575345569c04fb772e8986be085b 100644 (file)
@@ -63,9 +63,9 @@ msg_comm_t communicator::real_send(const char* dest, message* msg)
 
 void communicator::real_flush(sent_comm_type& sent_comm, bool wait)
 {
-    sent_comm_type::iterator bound;
-    bound = std::remove_if(sent_comm.begin(), sent_comm.end(),
-                           comm_test_n_destroy);
+    sent_comm_type::iterator bound =
+        std::remove_if(sent_comm.begin(), sent_comm.end(),
+                       comm_test_n_destroy);
     sent_comm.erase(bound, sent_comm.end());
     if (wait && !sent_comm.empty()) {
         size_t size = sent_comm.size();
@@ -73,8 +73,7 @@ void communicator::real_flush(sent_comm_type& sent_comm, bool wait)
         std::copy(sent_comm.begin(), sent_comm.end(), comms);
         sent_comm.clear();
         MSG_comm_waitall(comms, size, -1.0);
-        if (!MSG_WAIT_DESTROYS_COMMS)
-            std::for_each(comms, comms + size, comm_check_n_destroy);
+        std::for_each(comms, comms + size, comm_check_n_destroy);
         delete[] comms;
     }
 }