aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/ThreadPool
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-12-12 11:58:38 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-12-12 11:58:38 -0800
commit8ae68924ed11c26b0fd59a29e2f8a6713102d67d (patch)
tree0262d264e06083a08fd850962779749a5ecff2df /unsupported/Eigen/CXX11/src/ThreadPool
parent57acb05eefec9f59dafc95fd386b3f6d81040962 (diff)
Made ThreadPoolInterface::Cancel() an optional functionality
Diffstat (limited to 'unsupported/Eigen/CXX11/src/ThreadPool')
-rw-r--r--unsupported/Eigen/CXX11/src/ThreadPool/ThreadPoolInterface.h5
1 files 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<void()> 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;