summaryrefslogtreecommitdiff
path: root/src/mongo/unittest
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2019-04-27 15:05:28 -0400
committerA. Jesse Jiryu Davis <jesse@mongodb.com>2019-05-04 14:49:58 -0400
commit30f602bb9c8799e9b2b0d1c608d13fdfb24d2ce2 (patch)
tree7a03a34d4fe4589324de2d76fdc82d6df06a35a5 /src/mongo/unittest
parent4fb71c5a1c79b745ef56d53a8264ef5fdd202dda (diff)
downloadmongo-30f602bb9c8799e9b2b0d1c608d13fdfb24d2ce2.tar.gz
SERVER-40765 TaskExecutor inherits from OutOfLineExecutor
Diffstat (limited to 'src/mongo/unittest')
-rw-r--r--src/mongo/unittest/task_executor_proxy.cpp6
-rw-r--r--src/mongo/unittest/task_executor_proxy.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/unittest/task_executor_proxy.cpp b/src/mongo/unittest/task_executor_proxy.cpp
index e092e8645bd..5cae0ade222 100644
--- a/src/mongo/unittest/task_executor_proxy.cpp
+++ b/src/mongo/unittest/task_executor_proxy.cpp
@@ -75,7 +75,7 @@ void TaskExecutorProxy::signalEvent(const EventHandle& event) {
}
StatusWith<executor::TaskExecutor::CallbackHandle> TaskExecutorProxy::onEvent(
- const EventHandle& event, CallbackFn work) {
+ const EventHandle& event, CallbackFn&& work) {
return _executor->onEvent(event, std::move(work));
}
@@ -90,12 +90,12 @@ StatusWith<stdx::cv_status> TaskExecutorProxy::waitForEvent(OperationContext* op
}
StatusWith<executor::TaskExecutor::CallbackHandle> TaskExecutorProxy::scheduleWork(
- CallbackFn work) {
+ CallbackFn&& work) {
return _executor->scheduleWork(std::move(work));
}
StatusWith<executor::TaskExecutor::CallbackHandle> TaskExecutorProxy::scheduleWorkAt(
- Date_t when, CallbackFn work) {
+ Date_t when, CallbackFn&& work) {
return _executor->scheduleWorkAt(when, std::move(work));
}
diff --git a/src/mongo/unittest/task_executor_proxy.h b/src/mongo/unittest/task_executor_proxy.h
index 436c3a72216..17b2d59b746 100644
--- a/src/mongo/unittest/task_executor_proxy.h
+++ b/src/mongo/unittest/task_executor_proxy.h
@@ -58,13 +58,13 @@ public:
Date_t now() override;
StatusWith<EventHandle> makeEvent() override;
void signalEvent(const EventHandle& event) override;
- StatusWith<CallbackHandle> onEvent(const EventHandle& event, CallbackFn work) override;
+ StatusWith<CallbackHandle> onEvent(const EventHandle& event, CallbackFn&& work) override;
void waitForEvent(const EventHandle& event) override;
StatusWith<stdx::cv_status> waitForEvent(OperationContext* opCtx,
const EventHandle& event,
Date_t deadline) override;
- StatusWith<CallbackHandle> scheduleWork(CallbackFn work) override;
- StatusWith<CallbackHandle> scheduleWorkAt(Date_t when, CallbackFn work) override;
+ StatusWith<CallbackHandle> scheduleWork(CallbackFn&& work) override;
+ StatusWith<CallbackHandle> scheduleWorkAt(Date_t when, CallbackFn&& work) override;
StatusWith<CallbackHandle> scheduleRemoteCommand(const executor::RemoteCommandRequest& request,
const RemoteCommandCallbackFn& cb,
const BatonHandle& baton = nullptr) override;