diff options
Diffstat (limited to 'src/mongo/db/client_out_of_line_executor.cpp')
-rw-r--r-- | src/mongo/db/client_out_of_line_executor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/client_out_of_line_executor.cpp b/src/mongo/db/client_out_of_line_executor.cpp index e2fe618165f..f82612266ba 100644 --- a/src/mongo/db/client_out_of_line_executor.cpp +++ b/src/mongo/db/client_out_of_line_executor.cpp @@ -55,6 +55,8 @@ ClientOutOfLineExecutor::ClientOutOfLineExecutor() noexcept : _impl{std::make_unique<Impl>()}, _taskQueue{std::make_shared<QueueType>()} {} ClientOutOfLineExecutor::~ClientOutOfLineExecutor() noexcept { + if (!_requireShutdown.load()) + return; invariant(_isShutdown); } @@ -83,7 +85,7 @@ ClientOutOfLineExecutor* ClientOutOfLineExecutor::get(const Client* client) noex } void ClientOutOfLineExecutor::schedule(Task task) { - _taskQueue->push(std::move(task)); + getHandle().schedule(std::move(task)); } void ClientOutOfLineExecutor::consumeAllTasks() noexcept { |