mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-21 20:17:35 +08:00
Made ThreadPoolInterface::Cancel() an optional functionality
This commit is contained in:
parent
57acb05eef
commit
8ae68924ed
@ -19,9 +19,10 @@ class ThreadPoolInterface {
|
|||||||
// Submits a closure to be run by a thread in the pool.
|
// 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;
|
||||||
|
|
||||||
// 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.
|
// 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.
|
// Returns the number of threads in the pool.
|
||||||
virtual int NumThreads() const = 0;
|
virtual int NumThreads() const = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user