Msg.info("All tasks have been dispatched. Let's tell (asynchronously) everybody the computation is over, and sleep 20s so that nobody gets a message from a terminated process.");
for (int i = 0; i < slavesCount; i++) {
FinalizeTask task = new FinalizeTask();
task.dsend("slave_"+(i%slavesCount));
}
Msg.info("All tasks have been dispatched. Let's tell (asynchronously) everybody the computation is over, and sleep 20s so that nobody gets a message from a terminated process.");
for (int i = 0; i < slavesCount; i++) {
FinalizeTask task = new FinalizeTask();
task.dsend("slave_"+(i%slavesCount));
}