Workaround for mac startup hardlock. (STORM-1641)

This commit is contained in:
Shyotl
2011-10-18 09:33:20 -05:00
parent 4446b0fbad
commit 82b0171a86
5 changed files with 11 additions and 6 deletions

View File

@@ -38,7 +38,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),
@@ -47,6 +47,11 @@ LLQueuedThread::LLQueuedThread(const std::string& name, bool threaded) :
{
if (mThreaded)
{
if(should_pause)
{
pause() ; //call this before start the thread.
}
start();
}
}

View File

@@ -154,7 +154,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();

View File

@@ -40,8 +40,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;
}

View File

@@ -89,7 +89,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);

View File

@@ -1962,7 +1962,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),