From ac415c00947248a80e8f0e2d9ff3d910af0e99d2 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Tue, 6 Nov 2018 11:14:34 +0800 Subject: [PATCH] change lock_guard to unique_lock --- paddle/fluid/framework/threadpool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/threadpool.cc b/paddle/fluid/framework/threadpool.cc index a471c83115..21fab2cf5f 100644 --- a/paddle/fluid/framework/threadpool.cc +++ b/paddle/fluid/framework/threadpool.cc @@ -57,7 +57,7 @@ ThreadPool::ThreadPool(int num_threads) : running_(true) { ThreadPool::~ThreadPool() { { // notify all threads to stop running - std::lock_guard l(mutex_); + std::unique_lock l(mutex_); running_ = false; } scheduled_.notify_all(); -- GitLab