summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-10-11 13:55:20 -0400
committerOz Linden <oz@lindenlab.com>2011-10-11 13:55:20 -0400
commitaabdbeadf53b3a20b4db563a23535af74fd7d4b7 (patch)
treec2cdcbf4758462b11f296c9ab200237aa33e5c71 /indra
parentbe251b06eb785a2d301115f9c231eb5f3c906224 (diff)
parent852349218e5cfdd48a1a64c672e9663aab716031 (diff)
pull back beta fix for sh-2434
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llqueuedthread.cpp7
-rw-r--r--indra/llcommon/llqueuedthread.h2
-rw-r--r--indra/llcommon/llworkerthread.cpp4
-rw-r--r--indra/llcommon/llworkerthread.h2
-rw-r--r--indra/newview/lltexturefetch.cpp2
5 files changed, 11 insertions, 6 deletions
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp
index efd9c4b68f..5dee7a3541 100644
--- a/indra/llcommon/llqueuedthread.cpp
+++ b/indra/llcommon/llqueuedthread.cpp
@@ -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();
}
}
diff --git a/indra/llcommon/llqueuedthread.h b/indra/llcommon/llqueuedthread.h
index a53b22f6fc..499d13a792 100644
--- a/indra/llcommon/llqueuedthread.h
+++ b/indra/llcommon/llqueuedthread.h
@@ -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();
diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp
index 6b308bb917..e186621503 100644
--- a/indra/llcommon/llworkerthread.cpp
+++ b/indra/llcommon/llworkerthread.cpp
@@ -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;
}
diff --git a/indra/llcommon/llworkerthread.h b/indra/llcommon/llworkerthread.h
index bef5ef53fe..973b78ca01 100644
--- a/indra/llcommon/llworkerthread.h
+++ b/indra/llcommon/llworkerthread.h
@@ -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);
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index e9be45ffd0..a6e0d4530a 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -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),