From ed5490f7bca3201e65838910db86ac95690a4a6b Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 9 Mar 2011 09:53:38 +0100 Subject: [PATCH] Neighbor/debt should be protected against concurrent access too. --- process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process.cpp b/process.cpp index 3df086b..21eeb7a 100644 --- a/process.cpp +++ b/process.cpp @@ -135,7 +135,6 @@ void process::load_balance_loop() XBT_INFO("(%u:%u) current load: %g", lb_iter, comp_iter, real_load); XBT_VERB("... expected load: %g", expected_load); } - mutex.release(); if (expected_load > 0.0) load_balance(); @@ -146,6 +145,7 @@ void process::load_balance_loop() std::for_each(neigh.begin(), neigh.end(), bind(&process::ctrl_send, this, _1)); prev_load_broadcast = expected_load; + mutex.release(); sleep_until_date(next_iter_after_date, opt::min_lb_iter_duration); ctrl_receive(0.0); -- 2.39.5