summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-05-31 16:54:05 -0500
committerDave Parks <davep@lindenlab.com>2022-05-31 16:54:05 -0500
commitfc7b5549cb6092194d11b8d87600f21992305c1c (patch)
tree40ef1776b4abd77405c60d64043f5782dfc3e4be /indra/newview
parentdfa71e2bb59e81de93f626fada6975ae46b01bb6 (diff)
SL-17484 Fix for unit tests. Deprecate non-threaded LLQueuedThread and make lllfsthread threaded.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a172308d2a..d7ed2bb4df 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1680,16 +1680,20 @@ S32 LLAppViewer::updateTextureThreads(F32 max_time)
void LLAppViewer::flushLFSIO()
{
- while (1)
- {
- S32 pending = LLLFSThread::updateClass(0);
- if (!pending)
- {
- break;
- }
- LL_INFOS() << "Waiting for pending IO to finish: " << pending << LL_ENDL;
- ms_sleep(100);
- }
+ S32 pending = LLLFSThread::updateClass(0);
+ if (pending > 0)
+ {
+ LL_INFOS() << "Waiting for pending IO to finish: " << pending << LL_ENDL;
+ while (1)
+ {
+ pending = LLLFSThread::updateClass(0);
+ if (!pending)
+ {
+ break;
+ }
+ ms_sleep(100);
+ }
+ }
}
bool LLAppViewer::cleanup()
@@ -2187,7 +2191,7 @@ bool LLAppViewer::initThreads()
LLImage::initClass(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange"));
- LLLFSThread::initClass(enable_threads && false);
+ LLLFSThread::initClass(enable_threads && true); // TODO: fix crashes associated with this shutdo
// Image decoding
LLAppViewer::sImageDecodeThread = new LLImageDecodeThread(enable_threads && true);