Reduced locking.
parent
022526661b
commit
5b19d5a7b7
|
@ -167,8 +167,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
J2KImage imagereq;
|
J2KImage imagereq;
|
||||||
int numCollected = 0;
|
int numCollected = 0;
|
||||||
|
|
||||||
lock (m_syncRoot)
|
//lock (m_syncRoot)
|
||||||
{
|
//{
|
||||||
m_lastloopprocessed = DateTime.Now.Ticks;
|
m_lastloopprocessed = DateTime.Now.Ticks;
|
||||||
|
|
||||||
// This can happen during Close()
|
// This can happen during Close()
|
||||||
|
@ -191,7 +191,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (numCollected == count)
|
if (numCollected == count)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
|
||||||
return m_priorityQueue.Count > 0;
|
return m_priorityQueue.Count > 0;
|
||||||
}
|
}
|
||||||
|
@ -211,16 +211,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
J2KImage image = null;
|
J2KImage image = null;
|
||||||
|
|
||||||
|
lock (m_priorityQueue)
|
||||||
|
{
|
||||||
|
|
||||||
if (m_priorityQueue.Count > 0)
|
if (m_priorityQueue.Count > 0)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
lock (m_priorityQueue)
|
|
||||||
image = m_priorityQueue.FindMax();
|
image = m_priorityQueue.FindMax();
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue