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

Private GIT Repository
Reintroduce make variables for compilation of C programs.
[loba.git] / process.cpp
index 53cbb59c7434da4a84beb5d2971e8c98ea7ae910..b6afb49d8b23dded44cf25e0f6e958b77e1d3294 100644 (file)
@@ -227,6 +227,7 @@ void process::send()
                       bind(&process::send1_no_bookkeeping, this, _1));
         prev_load_broadcast = load;
     }
+    comm.flush(false);
 }
 
 void process::receive(bool wait)
@@ -263,6 +264,7 @@ void process::receive(bool wait)
         delete msg;
         wait = false;           // only wait on first recv
     }
+    comm.flush(false);
 }
 
 void process::finalize1(neighbor& nb)
@@ -286,8 +288,10 @@ void process::finalize()
 
     DEBUG2("wait for CLOSE from %lu neighbor%s",
            (unsigned long )neigh.size(), ESSE(neigh.size()));
-    while (may_receive())
+    while (may_receive()) {
+        comm.flush(false);
         receive(true);
+    }
 
     comm.flush(true);
 }