diff options
Diffstat (limited to 'src/mongo/util/concurrency/thread_pool_interface.h')
-rw-r--r-- | src/mongo/util/concurrency/thread_pool_interface.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/util/concurrency/thread_pool_interface.h b/src/mongo/util/concurrency/thread_pool_interface.h index bb59ac8e9f8..847dfe0506b 100644 --- a/src/mongo/util/concurrency/thread_pool_interface.h +++ b/src/mongo/util/concurrency/thread_pool_interface.h @@ -30,7 +30,6 @@ #pragma once #include "mongo/util/functional.h" -#include "mongo/util/out_of_line_executor.h" namespace mongo { @@ -39,11 +38,13 @@ class Status; /** * Interface for a thread pool. */ -class ThreadPoolInterface : public OutOfLineExecutor { +class ThreadPoolInterface { ThreadPoolInterface(const ThreadPoolInterface&) = delete; ThreadPoolInterface& operator=(const ThreadPoolInterface&) = delete; public: + using Task = unique_function<void()>; + /** * Destroys a thread pool. * @@ -81,7 +82,7 @@ public: * It is safe to call this before startup(), but the scheduled task will not execute * until after startup() is called. */ - virtual void schedule(Task task) = 0; + virtual Status schedule(Task task) = 0; protected: ThreadPoolInterface() = default; |