From 5d86ef70963d1b8dab9062f9469777a0898f92eb Mon Sep 17 00:00:00 2001 From: ayongsir Date: Fri, 22 Dec 2023 18:22:09 +0800 Subject: [PATCH] fix: fix cyber thread_pool.h Enqueue() task_queue_.Enqueue possible failure exception --- cyber/base/thread_pool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyber/base/thread_pool.h b/cyber/base/thread_pool.h index e875bca3647..0d3ba909db0 100644 --- a/cyber/base/thread_pool.h +++ b/cyber/base/thread_pool.h @@ -82,7 +82,7 @@ auto ThreadPool::Enqueue(F&& f, Args&&... args) if (stop_) { return std::future(); } - task_queue_.Enqueue([task]() { (*task)(); }); + (void)task_queue_.WaitEnqueue([task]() { (*task)(); }); return res; };