summaryrefslogtreecommitdiff
path: root/src/mongo/unittest
diff options
context:
space:
mode:
authorJanna Golden <janna.golden@mongodb.com>2020-02-22 02:45:57 +0000
committerevergreen <evergreen@mongodb.com>2020-02-22 02:45:57 +0000
commitb2d5432fdceaab0589fe6ca4eda24564515d58f9 (patch)
treed720f4ac3221d5d95b189f2ffa0d79a870082c09 /src/mongo/unittest
parent60aed37d906100af704bcb5c4cb8f6080e1540fe (diff)
downloadmongo-b2d5432fdceaab0589fe6ca4eda24564515d58f9.tar.gz
SERVER-44951 Expand TaskExecutor to implement exhaust functionality
Diffstat (limited to 'src/mongo/unittest')
-rw-r--r--src/mongo/unittest/task_executor_proxy.cpp12
-rw-r--r--src/mongo/unittest/task_executor_proxy.h5
2 files changed, 17 insertions, 0 deletions
diff --git a/src/mongo/unittest/task_executor_proxy.cpp b/src/mongo/unittest/task_executor_proxy.cpp
index dd583c17056..911123d375c 100644
--- a/src/mongo/unittest/task_executor_proxy.cpp
+++ b/src/mongo/unittest/task_executor_proxy.cpp
@@ -106,6 +106,18 @@ StatusWith<executor::TaskExecutor::CallbackHandle> TaskExecutorProxy::scheduleRe
return _executor->scheduleRemoteCommandOnAny(request, cb, baton);
}
+StatusWith<executor::TaskExecutor::CallbackHandle>
+TaskExecutorProxy::scheduleExhaustRemoteCommandOnAny(
+ const executor::RemoteCommandRequestOnAny& request,
+ const RemoteCommandOnAnyCallbackFn& cb,
+ const BatonHandle& baton) {
+ return _executor->scheduleExhaustRemoteCommandOnAny(request, cb, baton);
+}
+
+bool TaskExecutorProxy::hasTasks() {
+ return _executor->hasTasks();
+}
+
void TaskExecutorProxy::cancel(const CallbackHandle& cbHandle) {
_executor->cancel(cbHandle);
}
diff --git a/src/mongo/unittest/task_executor_proxy.h b/src/mongo/unittest/task_executor_proxy.h
index 3d37f837e81..fa27e0cde05 100644
--- a/src/mongo/unittest/task_executor_proxy.h
+++ b/src/mongo/unittest/task_executor_proxy.h
@@ -69,6 +69,11 @@ public:
const executor::RemoteCommandRequestOnAny& request,
const RemoteCommandOnAnyCallbackFn& cb,
const BatonHandle& baton = nullptr) override;
+ StatusWith<CallbackHandle> scheduleExhaustRemoteCommandOnAny(
+ const executor::RemoteCommandRequestOnAny& request,
+ const RemoteCommandOnAnyCallbackFn& cb,
+ const BatonHandle& baton = nullptr) override;
+ bool hasTasks() override;
void cancel(const CallbackHandle& cbHandle) override;
void wait(const CallbackHandle& cbHandle,
Interruptible* interruptible = Interruptible::notInterruptible()) override;