diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2019-03-05 13:40:25 -0500 |
---|---|---|
committer | Ben Caimano <ben.caimano@10gen.com> | 2019-04-02 18:23:23 -0400 |
commit | 04ea1d46eb6c4c78e19409f120ae2e61f2a35204 (patch) | |
tree | da810936cb90baafd1a40a598a0420107b9506bc /src/mongo/util/concurrency/thread_pool_interface.h | |
parent | 374ae184764e7fb13c60bfa4a731715d22d56d17 (diff) | |
download | mongo-04ea1d46eb6c4c78e19409f120ae2e61f2a35204.tar.gz |
SERVER-39965 OutOfLineExecutor Tasks are now unique_function(Status)
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, 3 insertions, 4 deletions
diff --git a/src/mongo/util/concurrency/thread_pool_interface.h b/src/mongo/util/concurrency/thread_pool_interface.h index 847dfe0506b..bb59ac8e9f8 100644 --- a/src/mongo/util/concurrency/thread_pool_interface.h +++ b/src/mongo/util/concurrency/thread_pool_interface.h @@ -30,6 +30,7 @@ #pragma once #include "mongo/util/functional.h" +#include "mongo/util/out_of_line_executor.h" namespace mongo { @@ -38,13 +39,11 @@ class Status; /** * Interface for a thread pool. */ -class ThreadPoolInterface { +class ThreadPoolInterface : public OutOfLineExecutor { ThreadPoolInterface(const ThreadPoolInterface&) = delete; ThreadPoolInterface& operator=(const ThreadPoolInterface&) = delete; public: - using Task = unique_function<void()>; - /** * Destroys a thread pool. * @@ -82,7 +81,7 @@ public: * It is safe to call this before startup(), but the scheduled task will not execute * until after startup() is called. */ - virtual Status schedule(Task task) = 0; + virtual void schedule(Task task) = 0; protected: ThreadPoolInterface() = default; |