summaryrefslogtreecommitdiff
path: root/indra/llcommon/llqueuedthread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llqueuedthread.cpp')
-rw-r--r--indra/llcommon/llqueuedthread.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp
index 871c42f7ee..60304fff75 100644
--- a/indra/llcommon/llqueuedthread.cpp
+++ b/indra/llcommon/llqueuedthread.cpp
@@ -37,12 +37,13 @@
// MAIN THREAD
LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded, bool should_pause) :
LLThread(name),
- mThreaded(threaded),
mIdleThread(TRUE),
mNextHandle(0),
mStarted(FALSE),
+ mThreaded(threaded),
mRequestQueue(name, 1024 * 1024)
{
+ llassert(threaded); // not threaded implementation is deprecated
mMainQueue = LL::WorkQueue::getInstance("mainloop");
if (mThreaded)
@@ -138,14 +139,18 @@ S32 LLQueuedThread::updateQueue(F32 max_time_ms)
if (mThreaded)
{
// schedule a call to threadedUpdate for every call to updateQueue
- mRequestQueue.post([=]()
- {
- LL_PROFILE_ZONE_NAMED_CATEGORY_THREAD("qt - update");
- mIdleThread = FALSE;
- threadedUpdate();
- mIdleThread = TRUE;
- }
- );
+ if (!isQuitting())
+ {
+ mRequestQueue.post([=]()
+ {
+ LL_PROFILE_ZONE_NAMED_CATEGORY_THREAD("qt - update");
+ mIdleThread = FALSE;
+ threadedUpdate();
+ mIdleThread = TRUE;
+ }
+ );
+ }
+
if(getPending() > 0)
{
unpause();