mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
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.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user