diff options
author | Amirsaman Memaripour <amirsaman.memaripour@mongodb.com> | 2020-06-25 15:45:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-25 23:12:58 +0000 |
commit | 341fb5d34695cb7d0994f5d91947355d60dabf36 (patch) | |
tree | af5432f0e423d91bd6eee4e11393de57bdf6b15f /src/mongo/db/client_out_of_line_executor.h | |
parent | 2fbc2ed9269db23c17eeed2acc6b94dceee025bb (diff) | |
download | mongo-341fb5d34695cb7d0994f5d91947355d60dabf36.tar.gz |
SERVER-48901 Have a client observer destroy ClientOutOfLineExecutor
Diffstat (limited to 'src/mongo/db/client_out_of_line_executor.h')
-rw-r--r-- | src/mongo/db/client_out_of_line_executor.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/client_out_of_line_executor.h b/src/mongo/db/client_out_of_line_executor.h index a37a33133b2..08a9a734d82 100644 --- a/src/mongo/db/client_out_of_line_executor.h +++ b/src/mongo/db/client_out_of_line_executor.h @@ -55,6 +55,8 @@ public: using Task = OutOfLineExecutor::Task; + void shutdown(); + void schedule(Task) override; // Blocks until the executor is done running all scheduled tasks. @@ -84,6 +86,9 @@ private: std::unique_ptr<Impl> _impl; std::shared_ptr<QueueType> _taskQueue; + + // Provides the means to ensure `shutdown()` always precedes the destructor. + bool _isShutdown = false; }; } // namespace mongo |