Skip to content

Commit

Permalink
Fix Bugs for multi process (dmlc#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
kangshantong committed Jul 26, 2021
1 parent 08fb534 commit 4886183
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/postoffice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ void Postoffice::Manage(const Message& recv) {
if (ctrl.cmd == Control::BARRIER && !recv.meta.request) {
barrier_mu_.lock();
auto size = barrier_done_[recv.meta.app_id].size();
for (size_t customer_id = 0; customer_id < size; customer_id++) {
for (auto iter=barrier_done_[recv.meta.app_id].begin();iter!=barrier_done_[recv.meta.app_id].end(); iter++) {
size_t customer_id = iter -> first;
barrier_done_[recv.meta.app_id][customer_id] = true;
}
barrier_mu_.unlock();
Expand Down

0 comments on commit 4886183

Please sign in to comment.