From 5b19d5a7b763a5ff5a7380f00c08fc30f4707588 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 4 Oct 2009 14:05:58 -0700 Subject: Reduced locking. --- OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs index facfb9d..2120d33 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs @@ -167,8 +167,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP J2KImage imagereq; int numCollected = 0; - lock (m_syncRoot) - { + //lock (m_syncRoot) + //{ m_lastloopprocessed = DateTime.Now.Ticks; // This can happen during Close() @@ -191,7 +191,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (numCollected == count) break; } - } + //} return m_priorityQueue.Count > 0; } @@ -211,16 +211,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP { J2KImage image = null; - if (m_priorityQueue.Count > 0) + lock (m_priorityQueue) { - try + + if (m_priorityQueue.Count > 0) { - lock (m_priorityQueue) + try + { image = m_priorityQueue.FindMax(); + } + catch (Exception) { } } - catch (Exception) { } } - return image; } -- cgit v1.1