aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
diff options
context:
space:
mode:
authorDiva Canto2009-10-04 14:05:58 -0700
committerDiva Canto2009-10-04 14:05:58 -0700
commit5b19d5a7b763a5ff5a7380f00c08fc30f4707588 (patch)
tree83c06a07e69730956b6c701e86297c370e3df886 /OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs
parentJust trying a few things. This one will reduce the number of async calls. (diff)
downloadopensim-SC-5b19d5a7b763a5ff5a7380f00c08fc30f4707588.zip
opensim-SC-5b19d5a7b763a5ff5a7380f00c08fc30f4707588.tar.gz
opensim-SC-5b19d5a7b763a5ff5a7380f00c08fc30f4707588.tar.bz2
opensim-SC-5b19d5a7b763a5ff5a7380f00c08fc30f4707588.tar.xz
Reduced locking.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs18
1 files changed, 10 insertions, 8 deletions
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
167 J2KImage imagereq; 167 J2KImage imagereq;
168 int numCollected = 0; 168 int numCollected = 0;
169 169
170 lock (m_syncRoot) 170 //lock (m_syncRoot)
171 { 171 //{
172 m_lastloopprocessed = DateTime.Now.Ticks; 172 m_lastloopprocessed = DateTime.Now.Ticks;
173 173
174 // This can happen during Close() 174 // This can happen during Close()
@@ -191,7 +191,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
191 if (numCollected == count) 191 if (numCollected == count)
192 break; 192 break;
193 } 193 }
194 } 194 //}
195 195
196 return m_priorityQueue.Count > 0; 196 return m_priorityQueue.Count > 0;
197 } 197 }
@@ -211,16 +211,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
211 { 211 {
212 J2KImage image = null; 212 J2KImage image = null;
213 213
214 if (m_priorityQueue.Count > 0) 214 lock (m_priorityQueue)
215 { 215 {
216 try 216
217 if (m_priorityQueue.Count > 0)
217 { 218 {
218 lock (m_priorityQueue) 219 try
220 {
219 image = m_priorityQueue.FindMax(); 221 image = m_priorityQueue.FindMax();
222 }
223 catch (Exception) { }
220 } 224 }
221 catch (Exception) { }
222 } 225 }
223
224 return image; 226 return image;
225 } 227 }
226 228