mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-02 15:05:16 +00:00
[#1818] Replaced wait_for with wait HttpThreadPool lambda
modified: http_thread_pool.cc
This commit is contained in:
@@ -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:
|
||||||
|
Reference in New Issue
Block a user