aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/BlockingQueue.cs
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Framework/BlockingQueue.cs
parentAdd a build script. (diff)
downloadopensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Framework/BlockingQueue.cs')
-rw-r--r--OpenSim/Framework/BlockingQueue.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs
index d11ad11..2461049 100644
--- a/OpenSim/Framework/BlockingQueue.cs
+++ b/OpenSim/Framework/BlockingQueue.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Framework
65 65
66 if (m_pqueue.Count > 0) 66 if (m_pqueue.Count > 0)
67 return m_pqueue.Dequeue(); 67 return m_pqueue.Dequeue();
68 68
69 if (m_queue.Count > 0) 69 if (m_queue.Count > 0)
70 return m_queue.Dequeue(); 70 return m_queue.Dequeue();
71 return default(T); 71 return default(T);
@@ -76,10 +76,10 @@ namespace OpenSim.Framework
76 { 76 {
77 lock (m_queueSync) 77 lock (m_queueSync)
78 { 78 {
79 bool success = true; 79 if (m_queue.Count < 1 && m_pqueue.Count < 1)
80 while (m_queue.Count < 1 && m_pqueue.Count < 1 && success)
81 { 80 {
82 success = Monitor.Wait(m_queueSync, msTimeout); 81 if(!Monitor.Wait(m_queueSync, msTimeout))
82 return default(T);
83 } 83 }
84 84
85 if (m_pqueue.Count > 0) 85 if (m_pqueue.Count > 0)