aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/BlockingQueue.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs
index 29fda9c..31e756e 100644
--- a/OpenSim/Framework/BlockingQueue.cs
+++ b/OpenSim/Framework/BlockingQueue.cs
@@ -67,12 +67,18 @@ namespace OpenSim.Framework
67 67
68 public int Count() 68 public int Count()
69 { 69 {
70 return m_queue.Count; 70 lock(m_queueSync)
71 {
72 return m_queue.Count;
73 }
71 } 74 }
72 75
73 public T[] GetQueueArray() 76 public T[] GetQueueArray()
74 { 77 {
75 return m_queue.ToArray(); 78 lock (m_queueSync)
79 {
80 return m_queue.ToArray();
81 }
76 } 82 }
77 } 83 }
78} 84}