diff options
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h index 5935b7cd8..84e1e6cc0 100644 --- a/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h +++ b/unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h @@ -19,8 +19,10 @@ class ThreadPoolInterface { // Submits a closure to be run by a thread in the pool. virtual void Schedule(std::function<void()> fn) = 0; - // Cancel all the threads in the pool. - virtual void Cancel() = 0; + // If implemented, stop processing the closures that have been enqueued. + // Currently running closures may still be processed. + // If not implemented, does nothing. + virtual void Cancel() {} // Returns the number of threads in the pool. virtual int NumThreads() const = 0; |