From 8ae68924ed11c26b0fd59a29e2f8a6713102d67d Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Mon, 12 Dec 2016 11:58:38 -0800 Subject: [PATCH] Made ThreadPoolInterface::Cancel() an optional functionality --- unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h index 5f2e1a013..84e1e6cc0 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h @@ -19,9 +19,10 @@ class ThreadPoolInterface { // Submits a closure to be run by a thread in the pool. virtual void Schedule(std::function fn) = 0; - // Stop processing the closures that have been enqueued. + // If implemented, stop processing the closures that have been enqueued. // Currently running closures may still be processed. - virtual void Cancel() = 0; + // If not implemented, does nothing. + virtual void Cancel() {} // Returns the number of threads in the pool. virtual int NumThreads() const = 0;