diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-03-20 10:20:06 +0100 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2023-03-20 21:08:42 +0100 |
commit | cf692c40b0b9f8d0d04cd10a02a84e3f697a2e99 (patch) | |
tree | c1ec822dd3bc87a5498f6e17cf92e7bd49f94c84 /indra/llcommon | |
parent | c23353cfc3f0a8c580c99332e47c288758a023c8 (diff) |
SL-18721: Faster viewer shutdown time since performance improvements can lead to perceived inventory loss due to cache corruption
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/threadpool.cpp | 5 | ||||
-rw-r--r-- | indra/llcommon/threadpool.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/indra/llcommon/threadpool.cpp b/indra/llcommon/threadpool.cpp index d5adf11264..4a7ead2110 100644 --- a/indra/llcommon/threadpool.cpp +++ b/indra/llcommon/threadpool.cpp @@ -39,6 +39,11 @@ void LL::ThreadPool::start() run(tname); }); } + + // Special workflow for LLWindowWin32Thread - it's close() should be called explicitly + if (mExplicitShutdown) + return; + // Listen on "LLApp", and when the app is shutting down, close the queue // and join the workers. LLEventPumps::instance().obtain("LLApp").listen( diff --git a/indra/llcommon/threadpool.h b/indra/llcommon/threadpool.h index f8eec3b457..0a5f14529b 100644 --- a/indra/llcommon/threadpool.h +++ b/indra/llcommon/threadpool.h @@ -59,6 +59,10 @@ namespace LL */ virtual void run(); + protected: + // LLWindowWin32Thread should set this flag to true + bool mExplicitShutdown { false }; + private: void run(const std::string& name); |