Do the same trick that dahlia did for Dequeue(timeout)

cpu-performance
Diva Canto 2013-07-17 13:23:29 -07:00
parent f4317dc26d
commit af792bc7f2
1 changed files with 3 additions and 2 deletions

View File

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