From 69ef267a77c1259133793c017c2f95f5378d11be Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Thu, 8 Dec 2016 14:03:25 -0800 Subject: [PATCH] Added the new threadpool cancel method to the threadpool interface based class. --- unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h index a65ee97c9..5935b7cd8 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h @@ -16,8 +16,12 @@ namespace Eigen { // custom thread pools underneath. class ThreadPoolInterface { public: + // Submits a closure to be run by a thread in the pool. virtual void Schedule(std::function fn) = 0; + // Cancel all the threads in the pool. + virtual void Cancel() = 0; + // Returns the number of threads in the pool. virtual int NumThreads() const = 0;