From 9ea7605608fb2526f1b056d727fe92488b52f447 Mon Sep 17 00:00:00 2001 From: "dujingcheng@huawei.com" Date: Thu, 3 Nov 2022 10:06:59 +0800 Subject: [PATCH] test Signed-off-by: dujingcheng@huawei.com Change-Id: Ia8461edc824b849531339b9dbb94b25d9c13205b --- base/src/thread_pool.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/src/thread_pool.cpp b/base/src/thread_pool.cpp index 9951929..6d8abe8 100644 --- a/base/src/thread_pool.cpp +++ b/base/src/thread_pool.cpp @@ -78,6 +78,7 @@ void ThreadPool::AddTask(const Task &f) } else { std::unique_lock lock(mutex_); while (Overloaded()) { + UTILS_LOGI("------dddddd---task- wait----"); acceptNewTask_.wait(lock); } @@ -97,6 +98,7 @@ ThreadPool::Task ThreadPool::ScheduleTask() { std::unique_lock lock(mutex_); while (tasks_.empty() && running_) { + UTILS_LOGI("------dddddd---thread- wait-"); hasTaskToDo_.wait(lock); } @@ -123,6 +125,7 @@ void ThreadPool::WorkInThread() Task task = ScheduleTask(); if (task) { task(); + UTILS_LOGI("------dddddd---do end-"); } } } -- Gitee