Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
emlowe committed Aug 17, 2023
1 parent 9cba6b5 commit aa9e067
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/prover_disk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,16 @@ class ContextQueue {
}
}
}
std::cout << " Setting this->context_queue_timeout to: " << context_queue_timeout
<< std::endl
<< std::flush;

this->context_queue_timeout = context_queue_timeout;

std::cout << " this->context_queue_timeout is now: " << this->context_queue_timeout
<< std::endl
<< std::flush;

return false;
}

Expand All @@ -182,10 +191,15 @@ class ContextQueue {

GreenReaperContext* pop() {
std::unique_lock<std::mutex> lock(mutex);

auto wait_time = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::seconds(context_queue_timeout));
std::cout << "[ContextQueue] timeout is configured as " << context_queue_timeout
<< std::endl;
if (context_queue_timeout == 0) {
std::cout << "[ContextQueue] timeout is zero?? Hard-coding to 20 " << std::endl;
context_queue_timeout = 20;
}

auto wait_time = std::chrono::duration_cast<std::chrono::nanoseconds>(
std::chrono::seconds(context_queue_timeout));
std::cout << "[ContextQueue] pop() Will wait for nanoseconds: " << wait_time.count() << " ("
<< std::chrono::duration_cast<std::chrono::seconds>(wait_time).count() << "s)"
<< std::endl
Expand Down

0 comments on commit aa9e067

Please sign in to comment.