From 3beb180ee5ef1d3387999ad270a2e2677ad0e814 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 14 Dec 2016 18:33:39 -0800 Subject: Don't call EnvThread::OnCancel by default since it doesn't do anything. --- unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h') diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h b/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h index fb08deb20..335728665 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h @@ -70,9 +70,11 @@ class SimpleThreadPoolTempl : public ThreadPoolInterface { } void Cancel() { +#ifdef EIGEN_THREAD_ENV_SUPPORTS_CANCELLATION for (size_t i = 0; i < threads_.size(); i++) { threads_[i]->OnCancel(); } +#endif } int NumThreads() const final { -- cgit v1.2.3