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

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