mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 07:25:18 +00:00
[#1095] Fixed conditiona variable usage
This commit is contained in:
committed by
Razvan Becheriu
parent
3c6a32ee92
commit
c12ca665d8
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2017-2020 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -130,10 +130,8 @@ HATest::testSynchronousCommands(std::function<void()> commands) {
|
|||||||
void
|
void
|
||||||
HATest::signalServiceRunning(bool& running, std::mutex& mutex,
|
HATest::signalServiceRunning(bool& running, std::mutex& mutex,
|
||||||
std::condition_variable& condvar) {
|
std::condition_variable& condvar) {
|
||||||
{
|
std::lock_guard<std::mutex> lock(mutex);
|
||||||
std::lock_guard<std::mutex> lock(mutex);
|
running = true;
|
||||||
running = true;
|
|
||||||
}
|
|
||||||
condvar.notify_one();
|
condvar.notify_one();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user