summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-03-15 00:04:19 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-03-15 19:44:38 +0200
commit1161262029f9619fb02d81575382b64d82d9cd09 (patch)
tree4a2674c5ae409babf27439101d9bdb3cf6041c11 /indra
parent091ee67ec5b1c14cdee4601e9d258de7c52c9aa7 (diff)
SL-18721 Restore release behavior
Closing window correctly caused a significant amount of logout freezes with no known reproes. Temporarily returning to old behavior were thread was killes without closing window and will reenable in later maints to hopefully get a scenario or at least more data of what is causing the freeze.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/threadpool.h2
-rw-r--r--indra/llwindow/llwindowwin32.cpp20
2 files changed, 19 insertions, 3 deletions
diff --git a/indra/llcommon/threadpool.h b/indra/llcommon/threadpool.h
index b8be7bb81a..74056aea17 100644
--- a/indra/llcommon/threadpool.h
+++ b/indra/llcommon/threadpool.h
@@ -55,7 +55,7 @@ namespace LL
* ThreadPool listens for application shutdown messages on the "LLApp"
* LLEventPump. Call close() to shut down this ThreadPool early.
*/
- void close();
+ virtual void close();
std::string getName() const { return mName; }
size_t getWidth() const { return mThreads.size(); }
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 0d56d2f6f6..54e5f43e87 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -351,6 +351,7 @@ struct LLWindowWin32::LLWindowWin32Thread : public LL::ThreadPool
LLWindowWin32Thread();
void run() override;
+ void close() override;
// closes queue, wakes thread, waits until thread closes
void wakeAndDestroy();
@@ -4562,11 +4563,25 @@ U32 LLWindowWin32::getAvailableVRAMMegabytes()
#endif // LL_WINDOWS
inline LLWindowWin32::LLWindowWin32Thread::LLWindowWin32Thread()
- : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, false)
+ : LL::ThreadPool("Window Thread", 1, MAX_QUEUE_SIZE, true /*should be false, temporary workaround for SL-18721*/)
{
LL::ThreadPool::start();
}
+void LLWindowWin32::LLWindowWin32Thread::close()
+{
+ if (!mQueue->isClosed())
+ {
+ LL_WARNS() << "Closing window thread without using destroy_window_handler" << LL_ENDL;
+ LL::ThreadPool::close();
+
+ // Workaround for SL-18721 in case window closes too early and abruptly
+ LLSplashScreen::show();
+ LLSplashScreen::update("..."); // will be updated later
+ }
+}
+
+
/**
* LogChange is to log changes in status while trying to avoid spamming the
* log with repeated messages, especially in a tight loop. It refuses to log
@@ -4917,7 +4932,8 @@ void LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy()
{
if (mQueue->isClosed())
{
- LL_WARNS() << "Tried to close Queue. Win32 thread Queue already closed." <<LL_ENDL;
+ LL_WARNS() << "Tried to close Queue. Win32 thread Queue already closed." << LL_ENDL;
+ return;
}
// Make sure we don't leave a blank toolbar button.