diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2019-11-15 08:17:04 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2020-03-25 19:07:22 -0400 |
commit | fc2437fb5d349a094c1c64631ba6a5fd5675ddcc (patch) | |
tree | 76912f5fc5b691cc8085328e043780ccf7a598b4 /indra/llmessage/llcoproceduremanager.cpp | |
parent | 39f4acd92144546d346ecd63224945da8d64c5db (diff) |
DRTVWR-476: Introduce LLCoprocedureManager::close(). Use in tests.
The new close(void) method simply acquires the logic from
~LLCoprocedureManager() (which now calls close()). It's useful, even if only
in test programs, to be able to shut down all existing LLCoprocedurePools
without having to name them individually -- and without having to destroy the
LLCoprocedureManager singleton instance. Deleting an LLSingleton should be
done only once per process, whereas test programs want to reset the
LLCoprocedureManager after each test.
Diffstat (limited to 'indra/llmessage/llcoproceduremanager.cpp')
-rw-r--r-- | indra/llmessage/llcoproceduremanager.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llmessage/llcoproceduremanager.cpp b/indra/llmessage/llcoproceduremanager.cpp index 712cab5b19..c1e53ea278 100644 --- a/indra/llmessage/llcoproceduremanager.cpp +++ b/indra/llmessage/llcoproceduremanager.cpp @@ -134,10 +134,7 @@ LLCoprocedureManager::LLCoprocedureManager() LLCoprocedureManager::~LLCoprocedureManager() { - for(auto & poolEntry : mPoolMap) - { - poolEntry.second->close(); - } + close(); } LLCoprocedureManager::poolPtr_t LLCoprocedureManager::initializePool(const std::string &poolName) @@ -255,6 +252,14 @@ size_t LLCoprocedureManager::count(const std::string &pool) const return it->second->count(); } +void LLCoprocedureManager::close() +{ + for(auto & poolEntry : mPoolMap) + { + poolEntry.second->close(); + } +} + void LLCoprocedureManager::close(const std::string &pool) { poolMap_t::iterator it = mPoolMap.find(pool); |