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

Private GIT Repository
Be consistent, and start lb-loop by a receive too.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 1 Jun 2011 15:01:33 +0000 (17:01 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 1 Jun 2011 15:01:33 +0000 (17:01 +0200)
NOTES
process.cpp

diff --git a/NOTES b/NOTES
index 19fafe8e5aca34e257d15ee1409c5c9d56259399..71e27296cc07fbd0dd958b5b016b92b4f8ea620e 100644 (file)
--- a/NOTES
+++ b/NOTES
@@ -47,10 +47,10 @@ thread, and a load-balancing thread.
   ---------------------
 
     Loop
+    | receive ctrl messages
     | call load-balancing algorithm
     | send ctrl messages
     | sleep (min_lb_iter_duration)
-    | receive ctrl messages
     +-
     send CLOSE on ctrl for all neighbors
     wait for CLOSE on ctrl from all neighbors
index 2de3016588dd2dd95e66b073eba4b59eb1ab7e18..47dd94a19d1030db12c4e55c1cd9683ff1560176 100644 (file)
@@ -127,6 +127,8 @@ void process::load_balance_loop()
             ++lb_iter;
         }
 
+        ctrl_receive(0.0);
+
         mutex.acquire();
         if (!opt::bookkeeping)
             expected_load = real_load - get_sum_of_to_send();
@@ -150,7 +152,6 @@ void process::load_balance_loop()
         mutex.release();
 
         sleep_until_date(next_iter_after_date, opt::min_lb_iter_duration);
-        ctrl_receive(0.0);
     }
 
     XBT_VERB("Going to finalize for %s...", __func__);