From 6ae20d6282d88a73459d0121c7d8a458ddb9a4f4 Mon Sep 17 00:00:00 2001 From: Maksim Kita Date: Tue, 14 Jun 2022 12:10:11 +0200 Subject: [PATCH] Fixed style check --- src/Core/BackgroundSchedulePool.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Core/BackgroundSchedulePool.cpp b/src/Core/BackgroundSchedulePool.cpp index 916a3f5f902..e4582a733d6 100644 --- a/src/Core/BackgroundSchedulePool.cpp +++ b/src/Core/BackgroundSchedulePool.cpp @@ -94,7 +94,7 @@ void BackgroundSchedulePoolTaskInfo::execute() UInt64 milliseconds = watch.elapsedMilliseconds(); /// If the task is executed longer than specified time, it will be logged. - static const int32_t slow_execution_threshold_ms = 200; + static constexpr UInt64 slow_execution_threshold_ms = 200; if (milliseconds >= slow_execution_threshold_ms) LOG_TRACE(&Poco::Logger::get(log_name), "Execution took {} ms.", milliseconds); @@ -268,7 +268,8 @@ void BackgroundSchedulePool::threadFunction() std::unique_lock tasks_lock(tasks_mutex); { - tasks_cond_var.wait(tasks_lock, [&](){ + tasks_cond_var.wait(tasks_lock, [&]() + { return shutdown || !tasks.empty(); });