aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/ThreadPool
diff options
context:
space:
mode:
authorGravatar Rasmus Munk Larsen <rmlarsen@google.com>2018-08-23 13:06:39 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2018-08-23 13:06:39 -0700
commit8d9bc5cc022bee4a06201c7c5a1dec2b73697f5f (patch)
treec68d5e9bfb17d0448a595e3533e2ba4f59204494 /unsupported/Eigen/CXX11/src/ThreadPool
parente9f9d70611d0a66751c34b1430ed7649aff6e2bf (diff)
Fix g++ compilation.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool')
-rw-r--r--unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h b/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h
index 1cb63bcfa..60a0c9fb6 100644
--- a/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h
+++ b/unsupported/Eigen/CXX11/src/ThreadPool/NonBlockingThreadPool.h
@@ -180,8 +180,9 @@ class ThreadPoolTempl : public Eigen::ThreadPoolInterface {
// Main worker thread loop.
void WorkerLoop(int thread_id) {
#ifndef EIGEN_THREAD_LOCAL
+ std::unique_ptr<PerThread> new_pt(new PerThread());
per_thread_map_mutex_.lock();
- eigen_assert(per_thread_map_.emplace(GlobalThreadIdHash(), new PerThread()).second);
+ eigen_assert(per_thread_map_.emplace(GlobalThreadIdHash(), std::move(new_pt)).second);
per_thread_map_mutex_.unlock();
init_barrier_->Notify();
init_barrier_->Wait();