summaryrefslogtreecommitdiff
path: root/src/mongo/db/client_out_of_line_executor.cpp
diff options
context:
space:
mode:
authorAmirsaman Memaripour <amirsaman.memaripour@mongodb.com>2021-03-22 18:58:12 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-22 23:04:01 +0000
commit16ce9d71e1aea5a0244ddf0e7d547425b2671b2f (patch)
tree1e7fdd5a4ac3c234870c8df6b1df9e65763f093e /src/mongo/db/client_out_of_line_executor.cpp
parent373a974442db5edd9e7e7a4673eb9158e83244c7 (diff)
downloadmongo-16ce9d71e1aea5a0244ddf0e7d547425b2671b2f.tar.gz
SERVER-54365 Allow ClientOutOfLineExecutor to skip shutdown
Diffstat (limited to 'src/mongo/db/client_out_of_line_executor.cpp')
-rw-r--r--src/mongo/db/client_out_of_line_executor.cpp4
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 {