Merge branch 'DRTVWR-516-maint' of https://bitbucket.org/lindenlab/viewer
commit
0382c73f9d
|
|
@ -358,8 +358,9 @@ void LLThread::setQuitting()
|
|||
{
|
||||
mStatus = QUITTING;
|
||||
}
|
||||
// It's only safe to remove mRunCondition if all locked threads were notified
|
||||
mRunCondition->broadcast();
|
||||
mDataLock->unlock();
|
||||
wake();
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ void HttpReplyQueue::addOp(const HttpReplyQueue::opPtr_t &op)
|
|||
|
||||
mQueue.push_back(op);
|
||||
}
|
||||
mQueueCV.notify_all();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ protected:
|
|||
|
||||
OpContainer mQueue;
|
||||
LLCoreInt::HttpMutex mQueueMutex;
|
||||
LLCoreInt::HttpConditionVariable mQueueCV;
|
||||
|
||||
}; // end class HttpReplyQueue
|
||||
|
||||
|
|
|
|||
|
|
@ -142,13 +142,19 @@ void HttpRequestQueue::wakeAll()
|
|||
}
|
||||
|
||||
|
||||
void HttpRequestQueue::stopQueue()
|
||||
bool HttpRequestQueue::stopQueue()
|
||||
{
|
||||
{
|
||||
HttpScopedLock lock(mQueueMutex);
|
||||
|
||||
mQueueStopped = true;
|
||||
wakeAll();
|
||||
if (!mQueueStopped)
|
||||
{
|
||||
mQueueStopped = true;
|
||||
wakeAll();
|
||||
return true;
|
||||
}
|
||||
wakeAll();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public:
|
|||
/// them on their way.
|
||||
///
|
||||
/// Threading: callable by any thread.
|
||||
void stopQueue();
|
||||
bool stopQueue();
|
||||
|
||||
protected:
|
||||
static HttpRequestQueue * sInstance;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,11 @@ HttpService::~HttpService()
|
|||
// is a bit tricky.
|
||||
if (mRequestQueue)
|
||||
{
|
||||
mRequestQueue->stopQueue();
|
||||
if (mRequestQueue->stopQueue())
|
||||
{
|
||||
// Give mRequestQueue a chance to finish
|
||||
ms_sleep(10);
|
||||
}
|
||||
}
|
||||
|
||||
if (mThread)
|
||||
|
|
|
|||
|
|
@ -4101,7 +4101,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
|
|||
}
|
||||
|
||||
llcoro::suspend();
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -4168,7 +4168,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
|
|||
|
||||
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, postData);
|
||||
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -4208,7 +4208,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
|
|||
LL_WARNS("Avatar") << "Bake retry #" << retryCount << " in " << timeout << " seconds." << LL_ENDL;
|
||||
|
||||
llcoro::suspendUntilTimeout(timeout);
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID paren
|
|||
bool LLFloaterCompileQueue::processScript(LLHandle<LLFloaterCompileQueue> hfloater,
|
||||
const LLPointer<LLViewerObject> &object, LLInventoryObject* inventory, LLEventPump &pump)
|
||||
{
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
// Reply from coroutine came on shutdown
|
||||
// We are quiting, don't start any more coroutines!
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ bool LLDelayedGestureError::doDialog(const LLErrorEntry &ent, bool uuid_ok)
|
|||
}
|
||||
}
|
||||
|
||||
if(!LLApp::isQuitting())
|
||||
if(!LLApp::isExiting())
|
||||
{
|
||||
LLNotificationsUtil::add(ent.mNotifyName, args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -905,7 +905,7 @@ void LLMeshRepoThread::run()
|
|||
LL_WARNS(LOG_MESH) << "Convex decomposition unable to be loaded. Expect severe problems." << LL_ENDL;
|
||||
}
|
||||
|
||||
while (!LLApp::isQuitting())
|
||||
while (!LLApp::isExiting())
|
||||
{
|
||||
// *TODO: Revise sleep/wake strategy and try to move away
|
||||
// from polling operations in this thread. We can sleep
|
||||
|
|
@ -922,7 +922,7 @@ void LLMeshRepoThread::run()
|
|||
|
||||
mSignal->wait();
|
||||
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -1192,7 +1192,7 @@ void LLMeshRepoThread::loadMeshPhysicsShape(const LLUUID& mesh_id)
|
|||
|
||||
void LLMeshRepoThread::lockAndLoadMeshLOD(const LLVolumeParams& mesh_params, S32 lod)
|
||||
{
|
||||
if (!LLAppViewer::isQuitting())
|
||||
if (!LLAppViewer::isExiting())
|
||||
{
|
||||
loadMeshLOD(mesh_params, lod);
|
||||
}
|
||||
|
|
@ -2753,7 +2753,7 @@ void LLMeshUploadThread::doWholeModelUpload()
|
|||
LL_DEBUGS(LOG_MESH) << "POST request issued." << LL_ENDL;
|
||||
|
||||
mHttpRequest->update(0);
|
||||
while (! LLApp::isQuitting() && ! finished() && ! isDiscarded())
|
||||
while (! LLApp::isExiting() && ! finished() && ! isDiscarded())
|
||||
{
|
||||
ms_sleep(sleep_time);
|
||||
sleep_time = llmin(250U, sleep_time + sleep_time);
|
||||
|
|
@ -2802,7 +2802,7 @@ void LLMeshUploadThread::requestWholeModelFee()
|
|||
U32 sleep_time(10);
|
||||
|
||||
mHttpRequest->update(0);
|
||||
while (! LLApp::isQuitting() && ! finished() && ! isDiscarded())
|
||||
while (! LLApp::isExiting() && ! finished() && ! isDiscarded())
|
||||
{
|
||||
ms_sleep(sleep_time);
|
||||
sleep_time = llmin(250U, sleep_time + sleep_time);
|
||||
|
|
@ -3251,7 +3251,7 @@ common_exit:
|
|||
|
||||
LLMeshHeaderHandler::~LLMeshHeaderHandler()
|
||||
{
|
||||
if (!LLApp::isQuitting())
|
||||
if (!LLApp::isExiting())
|
||||
{
|
||||
if (! mProcessed)
|
||||
{
|
||||
|
|
@ -3395,7 +3395,7 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
|
|||
|
||||
LLMeshLODHandler::~LLMeshLODHandler()
|
||||
{
|
||||
if (! LLApp::isQuitting())
|
||||
if (! LLApp::isExiting())
|
||||
{
|
||||
if (! mProcessed)
|
||||
{
|
||||
|
|
@ -3665,7 +3665,7 @@ void LLMeshRepository::shutdown()
|
|||
mUploads[i]->discard() ; //discard the uploading requests.
|
||||
}
|
||||
|
||||
mThread->mSignal->signal();
|
||||
mThread->mSignal->broadcast();
|
||||
|
||||
while (!mThread->isStopped())
|
||||
{
|
||||
|
|
@ -4907,7 +4907,8 @@ void LLPhysicsDecomp::shutdown()
|
|||
if (mSignal)
|
||||
{
|
||||
mQuitting = true;
|
||||
mSignal->signal();
|
||||
// There is only one wait(), but just in case 'broadcast'
|
||||
mSignal->broadcast();
|
||||
|
||||
while (!isStopped())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1121,7 +1121,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
|
|||
}
|
||||
}
|
||||
|
||||
if (mGalleryCreated && !LLApp::isQuitting())
|
||||
if (mGalleryCreated && !LLApp::isExiting())
|
||||
{
|
||||
reArrangeRows();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ void LLToolMgr::clearTransientTool()
|
|||
|
||||
void LLToolMgr::onAppFocusLost()
|
||||
{
|
||||
if (LLApp::isQuitting())
|
||||
if (LLApp::isExiting())
|
||||
return;
|
||||
|
||||
if (mSelectedTool)
|
||||
|
|
|
|||
|
|
@ -583,7 +583,7 @@ void LLViewerAssetStorage::assetRequestCoro(
|
|||
|
||||
LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts);
|
||||
|
||||
if (LLApp::isQuitting() || !gAssetStorage)
|
||||
if (LLApp::isExiting() || !gAssetStorage)
|
||||
{
|
||||
// Bail out if result arrives after shutdown has been started.
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1438,6 +1438,11 @@ void LLVivoxVoiceClient::logoutOfVivox(bool wait)
|
|||
|
||||
result = llcoro::suspendUntilEventOnWithTimeout(mVivoxPump, LOGOUT_ATTEMPT_TIMEOUT, timeoutResult);
|
||||
|
||||
if (sShuttingDown)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
LL_DEBUGS("Voice") << "event=" << ll_stream_notation_sd(result) << LL_ENDL;
|
||||
// Don't get confused by prior queued events -- note that it's
|
||||
// very important that mVivoxPump is an LLEventMailDrop, which
|
||||
|
|
@ -1873,7 +1878,7 @@ bool LLVivoxVoiceClient::waitForChannel()
|
|||
|
||||
if (sShuttingDown)
|
||||
{
|
||||
logoutOfVivox(true);
|
||||
logoutOfVivox(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1968,9 +1973,9 @@ bool LLVivoxVoiceClient::waitForChannel()
|
|||
|
||||
mIsProcessingChannels = false;
|
||||
|
||||
logoutOfVivox(true);
|
||||
logoutOfVivox(!sShuttingDown /*bool wait*/);
|
||||
|
||||
if (mRelogRequested)
|
||||
if (mRelogRequested && !sShuttingDown)
|
||||
{
|
||||
LL_DEBUGS("Voice") << "Relog Requested, restarting provisioning" << LL_ENDL;
|
||||
if (!provisionVoiceAccount())
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ bool LLCrashLoggerWindows::frame()
|
|||
|
||||
MSG msg;
|
||||
memset(&msg, 0, sizeof(msg));
|
||||
while (!LLApp::isQuitting() && GetMessage(&msg, NULL, 0, 0))
|
||||
while (!LLApp::isExiting() && GetMessage(&msg, NULL, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue