Skip to content

Commit

Permalink
Improve logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
fchirica committed Aug 15, 2023
1 parent 9276347 commit dcbef6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prover_disk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ class ContextQueue {
while (queue.empty() && wait_time.count() > 0) {
auto before_wait = std::chrono::steady_clock::now();

if (condition.wait_for(lock, wait_time) == std::cv_status::timeout && queue.empty()) {
throw std::runtime_error("Timeout waiting for context queue.");
if (condition.wait_for(lock, wait_time) == std::cv_status::timeout) {
break;
}

auto elapsed = std::chrono::duration_cast<std::chrono::duration<double>>(std::chrono::steady_clock::now() - before_wait);
Expand Down

0 comments on commit dcbef6a

Please sign in to comment.