fix for SH-2434: Mac viewer sometimes freezes at start up and must be force quit.
parent
77eb3aae04
commit
5ef05e151d
|
|
@ -32,7 +32,7 @@
|
|||
//============================================================================
|
||||
|
||||
// MAIN THREAD
|
||||
LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded) :
|
||||
LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded, bool should_pause) :
|
||||
LLThread(name),
|
||||
mThreaded(threaded),
|
||||
mIdleThread(TRUE),
|
||||
|
|
@ -41,6 +41,11 @@ LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded) :
|
|||
{
|
||||
if (mThreaded)
|
||||
{
|
||||
if(should_pause)
|
||||
{
|
||||
pause() ; //call this before start the thread.
|
||||
}
|
||||
|
||||
start();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ public:
|
|||
static handle_t nullHandle() { return handle_t(0); }
|
||||
|
||||
public:
|
||||
LLQueuedThread(const std::string& name, bool threaded = true);
|
||||
LLQueuedThread(const std::string& name, bool threaded = true, bool should_pause = false);
|
||||
virtual ~LLQueuedThread();
|
||||
virtual void shutdown();
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@
|
|||
//============================================================================
|
||||
// Run on MAIN thread
|
||||
|
||||
LLWorkerThread::LLWorkerThread(const std::string& name, bool threaded) :
|
||||
LLQueuedThread(name, threaded)
|
||||
LLWorkerThread::LLWorkerThread(const std::string& name, bool threaded, bool should_pause) :
|
||||
LLQueuedThread(name, threaded, should_pause)
|
||||
{
|
||||
mDeleteMutex = new LLMutex;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ private:
|
|||
LLMutex* mDeleteMutex;
|
||||
|
||||
public:
|
||||
LLWorkerThread(const std::string& name, bool threaded = true);
|
||||
LLWorkerThread(const std::string& name, bool threaded = true, bool should_pause = false);
|
||||
~LLWorkerThread();
|
||||
|
||||
/*virtual*/ S32 update(U32 max_time_ms);
|
||||
|
|
|
|||
|
|
@ -1810,7 +1810,7 @@ bool LLTextureFetchWorker::writeToCacheComplete()
|
|||
// public
|
||||
|
||||
LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* imagedecodethread, bool threaded, bool qa_mode)
|
||||
: LLWorkerThread("TextureFetch", threaded),
|
||||
: LLWorkerThread("TextureFetch", threaded, true),
|
||||
mDebugCount(0),
|
||||
mDebugPause(FALSE),
|
||||
mPacketCount(0),
|
||||
|
|
|
|||
Loading…
Reference in New Issue