Skip to content

Commit

Permalink
Merge pull request #2588 from taminob/bugfix/fix-custom-module-signal…
Browse files Browse the repository at this point in the history
…-without-interval

Custom module: Allow signal without interrupt
  • Loading branch information
Alexays authored Oct 21, 2023
2 parents 3413b70 + b8afde0 commit 06f4028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/util/sleeper_thread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SleeperThread {
auto sleep() {
std::unique_lock lk(mutex_);
CancellationGuard cancel_lock;
return condvar_.wait(lk);
return condvar_.wait(lk, [this] { return signal_ || !do_run_; });
}

auto sleep_for(std::chrono::system_clock::duration dur) {
Expand Down

0 comments on commit 06f4028

Please sign in to comment.