From c605c7a7b7f7e79147d1f32ab03ff244e375204e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 18 Mar 2014 19:54:07 +0000 Subject: Lock m_syncRoot on DoubleQueue.Count. This is not documented as a thread-safe operation --- OpenSim/Framework/Util.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/Util.cs') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 65cf177..efaed62 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -2304,7 +2304,11 @@ namespace OpenSim.Framework public virtual int Count { - get { return m_highQueue.Count + m_lowQueue.Count; } + get + { + lock (m_syncRoot) + return m_highQueue.Count + m_lowQueue.Count; + } } public virtual void Enqueue(T data) -- cgit v1.1