From abdc99f21b542c4fea67030ddbd7166c9d1c6c63 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Wed, 18 Feb 2009 21:10:16 +0000 Subject: Merge of QAR-1267 to trunk. This was a combo merge of QAR-1175 (maint-render-9) and QAR-1236 (dll-msvcrt-2) svn merge -r 109838:112264 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-render/maint-render-9-merge-r109833 --- indra/llcommon/llworkerthread.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/llcommon/llworkerthread.cpp') diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp index cdc7c02348..5dda600755 100644 --- a/indra/llcommon/llworkerthread.cpp +++ b/indra/llcommon/llworkerthread.cpp @@ -37,16 +37,18 @@ #include "llframecallbackmanager.h" #endif -BOOL LLWorkerClass::sDeleteLock = FALSE ; //============================================================================ // Run on MAIN thread LLWorkerThread::LLWorkerThread(const std::string& name, bool threaded) : - LLQueuedThread(name, threaded), - mWorkerAPRPoolp(NULL) + LLQueuedThread(name, threaded) { - apr_pool_create(&mWorkerAPRPoolp, NULL); - mDeleteMutex = new LLMutex(getAPRPool()); + mDeleteMutex = new LLMutex(NULL); + + if(!mLocalAPRFilePoolp) + { + mLocalAPRFilePoolp = new LLVolatileAPRPool() ; + } } LLWorkerThread::~LLWorkerThread() @@ -96,7 +98,6 @@ S32 LLWorkerThread::update(U32 max_time_ms) { (*iter)->abortWork(false); } - LLWorkerClass::sDeleteLock = TRUE ; for (std::vector::iterator iter = delete_list.begin(); iter != delete_list.end(); ++iter) { @@ -110,8 +111,7 @@ S32 LLWorkerThread::update(U32 max_time_ms) } delete *iter; } - LLWorkerClass::sDeleteLock = FALSE ; - // delete and aborted entries mean there's still work to do + // delete and aborted entries mean there's still work to do res += delete_list.size() + abort_list.size(); return res; } @@ -188,7 +188,7 @@ LLWorkerClass::LLWorkerClass(LLWorkerThread* workerthread, const std::string& na : mWorkerThread(workerthread), mWorkerClassName(name), mRequestHandle(LLWorkerThread::nullHandle()), - mMutex(workerthread->getWorkerAPRPool()), + mMutex(NULL), mWorkFlags(0) { if (!mWorkerThread) -- cgit v1.2.3