Skip to content

Commit

Permalink
Wait for all workers in constructor, not just one
Browse files Browse the repository at this point in the history
This should fix several weird glitches, hangs and crashes introduced by d52d94f. May help #44 as well.
  • Loading branch information
ata4 committed Feb 19, 2018
1 parent ab56f66 commit 4c4a265
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class Parallel

// wait for workers to finish task to make sure they're ready
m_workers_active = m_workers.size();
m_signal_done.wait(ul);
while (m_workers_active) {
m_signal_done.wait(ul);
}
}

~Parallel() {
Expand Down

0 comments on commit 4c4a265

Please sign in to comment.