summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-02-09 20:06:46 -0600
committerDave Parks <davep@lindenlab.com>2011-02-09 20:06:46 -0600
commitd94117b80b67b6d27d2b2e14fb420682474e439e (patch)
treea913755e5f74d32c923d034a1937c60e94bd1ff8 /indra/llcommon/llthread.cpp
parent8f9edd3874823fccf9f78e45c758bee951b56e1d (diff)
SH-920 Wait for threads to shut down before deleting them -- also, fix some assertions that were encouraging people to comment out the destruction of LLSignal.
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r--indra/llcommon/llthread.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index b4617c5453..d9400fb5b3 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -425,6 +425,11 @@ void LLCondition::wait()
if (!isLocked())
{ //mAPRMutexp MUST be locked before calling apr_thread_cond_wait
apr_thread_mutex_lock(mAPRMutexp);
+#if MUTEX_DEBUG
+ // avoid asserts on destruction in non-release builds
+ U32 id = LLThread::currentID();
+ mIsLocked[id] = TRUE;
+#endif
}
apr_thread_cond_wait(mAPRCondp, mAPRMutexp);
}