let BlockingQueue timeout work as its suposed to and not wait for ever

avinationmerge
UbitUmarov 2014-07-24 05:37:56 +01:00
parent 6c3e08e18d
commit 05d071a430
1 changed files with 2 additions and 3 deletions

View File

@ -76,10 +76,9 @@ namespace OpenSim.Framework
{ {
lock (m_queueSync) lock (m_queueSync)
{ {
bool success = true; if (m_queue.Count < 1 && m_pqueue.Count < 1)
while (m_queue.Count < 1 && m_pqueue.Count < 1 && success)
{ {
success = Monitor.Wait(m_queueSync, msTimeout); Monitor.Wait(m_queueSync, msTimeout);
} }
if (m_pqueue.Count > 0) if (m_pqueue.Count > 0)