---------------------
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
++lb_iter;
}
+ ctrl_receive(0.0);
+
mutex.acquire();
if (!opt::bookkeeping)
expected_load = real_load - get_sum_of_to_send();
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__);