Possible fix for the 100% CPU issue. I've not fully

confirmed that this fixes the issue, however functional
correctness of BlockingQueue requires that these locks be
put into place anyway.
0.6.0-stable
Sean Dague 2008-04-14 14:37:36 +00:00
parent 2b7419c7fb
commit a3da86c6d7
1 changed files with 8 additions and 2 deletions

View File

@ -66,13 +66,19 @@ namespace OpenSim.Framework
} }
public int Count() public int Count()
{
lock(m_queueSync)
{ {
return m_queue.Count; return m_queue.Count;
} }
}
public T[] GetQueueArray() public T[] GetQueueArray()
{
lock (m_queueSync)
{ {
return m_queue.ToArray(); return m_queue.ToArray();
} }
} }
}
} }