From 4dabd9c0472deb49573fdafef2fa413e59703f19 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 2 Mar 2007 21:25:50 +0000 Subject: merge release@58699 beta-1-14-0@58707 -> release --- indra/llcommon/llthread.cpp | 63 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 12 deletions(-) (limited to 'indra/llcommon/llthread.cpp') diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index bd2dd7c8f5..a92d553148 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -80,6 +80,11 @@ LLThread::LLThread(const std::string& name, apr_pool_t *poolp) : LLThread::~LLThread() +{ + shutdown(); +} + +void LLThread::shutdown() { // Warning! If you somehow call the thread destructor from itself, // the thread will die in an unclean fashion! @@ -186,18 +191,6 @@ void LLThread::checkPause() //============================================================================ -bool LLThread::isQuitting() const -{ - return (QUITTING == mStatus); -} - - -bool LLThread::isStopped() const -{ - return (STOPPED == mStatus); -} - - void LLThread::setQuitting() { mRunCondition->lock(); @@ -328,3 +321,49 @@ void LLCondition::broadcast() apr_thread_cond_broadcast(mAPRCondp); } +//============================================================================ + +//---------------------------------------------------------------------------- + +//static +LLMutex* LLThreadSafeRefCount::sMutex = 0; + +//static +void LLThreadSafeRefCount::initClass() +{ + if (!sMutex) + { + sMutex = new LLMutex(0); + } +} + +//static +void LLThreadSafeRefCount::cleanupClass() +{ + delete sMutex; + sMutex = NULL; +} + + +//---------------------------------------------------------------------------- + +LLThreadSafeRefCount::LLThreadSafeRefCount() : + mRef(0) +{ +} + +LLThreadSafeRefCount::~LLThreadSafeRefCount() +{ + if (mRef != 0) + { + llerrs << "deleting non-zero reference" << llendl; + } +} + +//============================================================================ + +LLResponder::~LLResponder() +{ +} + +//============================================================================ -- cgit v1.2.3