Added the new threadpool cancel method to the threadpool interface based class.

This commit is contained in:
Benoit Steiner 2016-12-08 14:03:25 -08:00
parent 7bfff85355
commit 69ef267a77

View File

@ -16,8 +16,12 @@ namespace Eigen {
// custom thread pools underneath. // custom thread pools underneath.
class ThreadPoolInterface { class ThreadPoolInterface {
public: public:
// Submits a closure to be run by a thread in the pool.
virtual void Schedule(std::function<void()> fn) = 0; virtual void Schedule(std::function<void()> fn) = 0;
// Cancel all the threads in the pool.
virtual void Cancel() = 0;
// Returns the number of threads in the pool. // Returns the number of threads in the pool.
virtual int NumThreads() const = 0; virtual int NumThreads() const = 0;