diff options
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_external_state_impl.cpp')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_external_state_impl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp index 18c9ccac0a8..f5b1cbb55db 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -191,9 +191,9 @@ auto makeTaskExecutor(ServiceContext* service, const std::string& poolName) { * Schedules a task using the executor. This task is always run unless the task executor is shutting * down. */ -void scheduleWork(executor::TaskExecutor* executor, - const executor::TaskExecutor::CallbackFn& work) { - auto cbh = executor->scheduleWork([work](const executor::TaskExecutor::CallbackArgs& args) { +void scheduleWork(executor::TaskExecutor* executor, executor::TaskExecutor::CallbackFn work) { + auto cbh = executor->scheduleWork([work = std::move(work)]( + const executor::TaskExecutor::CallbackArgs& args) { if (args.status == ErrorCodes::CallbackCanceled) { return; } |