From d94117b80b67b6d27d2b2e14fb420682474e439e Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 9 Feb 2011 20:06:46 -0600 Subject: 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. --- indra/llcommon/llthread.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llcommon/llthread.cpp') 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); } -- cgit v1.2.3