Kaydet (Commit) cba3ac1e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid deadlocks when disposing recursive JobQueue::enter

...where the outer JobQueue::enter blocks on m_cndWait after it has been reset
again due to m_lstJob.empty().
üst 739100d0
......@@ -97,7 +97,9 @@ namespace cppu_threadpool {
if( 0 == m_lstCallstack.front() )
{
// disposed !
if( m_lstJob.empty() )
if( m_lstJob.empty()
&& (m_lstCallstack.empty()
|| m_lstCallstack.front() != 0) )
{
osl_resetCondition( m_cndWait );
}
......@@ -110,7 +112,8 @@ namespace cppu_threadpool {
job = m_lstJob.front();
m_lstJob.pop_front();
}
if( m_lstJob.empty() )
if( m_lstJob.empty()
&& (m_lstCallstack.empty() || m_lstCallstack.front() != 0) )
{
osl_resetCondition( m_cndWait );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment