mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +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.
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user