View | Details | Raw Unified | Return to issue 120476
Collapse All | Expand All

(-)a/main/cppu/source/threadpool/jobqueue.cxx (-2 / +15 lines)
Lines 84-91 namespace cppu_threadpool { Link Here
84
				}
84
				}
85
			}
85
			}
86
86
87
			osl_waitCondition( m_cndWait , 0 );
87
            // Wait 100ms for m_cndWait to change its value.
88
			
88
            // Using a timeout instead of an indefinite wait is
89
            // necessary to avoid deadlocks like the one described by
90
            // issue 120476.
91
            TimeValue aTimeout = {0, 100};
92
            osl_waitCondition( m_cndWait , &aTimeOut);
93
94
            // Continue with processing the next job only when the job
95
            // queue is not empty.
96
            {
97
				MutexGuard guard( m_mutex );
98
                if( m_lstJob.empty() )
99
                    continue;
100
            }
101
89
			struct Job job={0,0};
102
			struct Job job={0,0};
90
			{
103
			{
91
				// synchronize with add and dispose calls
104
				// synchronize with add and dispose calls

Return to issue 120476