Make sure mutex is locked before waiting on a signal.

Reviewed by Nyx.
meow-7.2.2
Dave Parks 2010-11-02 16:30:46 -05:00
parent 7aff5c6ff9
commit 126c8e371c
1 changed files with 4 additions and 0 deletions

View File

@ -406,6 +406,10 @@ LLCondition::~LLCondition()
void LLCondition::wait()
{
if (!isLocked())
{ //mAPRMutexp MUST be locked before calling apr_thread_cond_wait
apr_thread_mutex_lock(mAPRMutexp);
}
apr_thread_cond_wait(mAPRCondp, mAPRMutexp);
}