aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h
diff options
context:
space:
mode:
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h')
-rw-r--r--unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h b/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h
index e75d0f467..ab4f85fbf 100644
--- a/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h
+++ b/unsupported/Eigen/CXX11/src/ThreadPool/SimpleThreadPool.h
@@ -69,6 +69,12 @@ class SimpleThreadPoolTempl : public ThreadPoolInterface {
}
}
+ void Cancel() {
+ for (size_t i = 0; i < threads_.size(); i++) {
+ threads_[i]->Cancel();
+ }
+ }
+
int NumThreads() const final {
return static_cast<int>(threads_.size());
}