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
parent
2b7419c7fb
commit
a3da86c6d7
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue