Skip to content

Commit

Permalink
Fix error in timeout logic in Worker::wait_done() (#15)
Browse files Browse the repository at this point in the history
This would cause excessive looping after first 10 seconds of execution.
On Windows it could halt execution entirely, depending on how threads get scheduled.
  • Loading branch information
PetteriAimonen committed Apr 25, 2022
1 parent d550bf8 commit 6978134
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ bool Worker::wait_all(int timeout_ms)
{
return false; // Return with timeout
}
else
{
timeout = std::chrono::system_clock::now() + std::chrono::seconds(10);
}
}
}

Expand Down

0 comments on commit 6978134

Please sign in to comment.