diff options
author | Justin Clark-Casey (justincc) | 2014-03-18 19:54:07 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-03-18 19:54:07 +0000 |
commit | c605c7a7b7f7e79147d1f32ab03ff244e375204e (patch) | |
tree | 8edac878a55f8dee14e3b8dd7f1f199f95f81808 | |
parent | Fix a bug in previous commit 01520bb where I accidentally saved OtherCleanTim... (diff) | |
download | opensim-SC_OLD-c605c7a7b7f7e79147d1f32ab03ff244e375204e.zip opensim-SC_OLD-c605c7a7b7f7e79147d1f32ab03ff244e375204e.tar.gz opensim-SC_OLD-c605c7a7b7f7e79147d1f32ab03ff244e375204e.tar.bz2 opensim-SC_OLD-c605c7a7b7f7e79147d1f32ab03ff244e375204e.tar.xz |
Lock m_syncRoot on DoubleQueue.Count. This is not documented as a thread-safe operation
-rw-r--r-- | OpenSim/Framework/Util.cs | 6 |
1 files changed, 5 insertions, 1 deletions
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 | |||
2304 | 2304 | ||
2305 | public virtual int Count | 2305 | public virtual int Count |
2306 | { | 2306 | { |
2307 | get { return m_highQueue.Count + m_lowQueue.Count; } | 2307 | get |
2308 | { | ||
2309 | lock (m_syncRoot) | ||
2310 | return m_highQueue.Count + m_lowQueue.Count; | ||
2311 | } | ||
2308 | } | 2312 | } |
2309 | 2313 | ||
2310 | public virtual void Enqueue(T data) | 2314 | public virtual void Enqueue(T data) |