2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-02 06:55:16 +00:00

[#1818] Replaced wait_for with wait HttpThreadPool lambda

modified:   http_thread_pool.cc
This commit is contained in:
Thomas Markwalder
2021-05-10 13:29:28 +00:00
parent 4b8ca2cd7f
commit 76a56bda64

View File

@@ -81,14 +81,12 @@ HttpThreadPool::start() {
break; break;
case RunState::PAUSED: case RunState::PAUSED:
{ {
// We need to stop and wait to be released. We don't care how // We need to stop and wait to be released.
// we exit, we'll do whatever the current state dictates.
std::unique_lock<std::mutex> lck(mutex_); std::unique_lock<std::mutex> lck(mutex_);
static_cast<void>(cv_.wait_for(lck, std::chrono::milliseconds(25), cv_.wait(lck,
[&]() { [&]() {
return (run_state_ != RunState::PAUSED); return (run_state_ != RunState::PAUSED);
})); });
break; break;
} }
case RunState::SHUTDOWN: case RunState::SHUTDOWN: