diff options
author | Diva Canto | 2013-07-18 12:25:22 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-18 12:25:22 -0700 |
commit | a22a4db5cec02637b7653870d09b69c810d7dfe9 (patch) | |
tree | fd6e628c5b3b9b653499a28b4ecb526929643c03 /OpenSim/Framework/BlockingQueue.cs | |
parent | Revert "Revert "Putting the requests back in the queue while testing for coun... (diff) | |
download | opensim-SC-a22a4db5cec02637b7653870d09b69c810d7dfe9.zip opensim-SC-a22a4db5cec02637b7653870d09b69c810d7dfe9.tar.gz opensim-SC-a22a4db5cec02637b7653870d09b69c810d7dfe9.tar.bz2 opensim-SC-a22a4db5cec02637b7653870d09b69c810d7dfe9.tar.xz |
Revert "Revert "Do the same trick that dahlia did for Dequeue(timeout)""
This reverts commit 5495df74436d6c0039a1500d979a964b003abfdf.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/BlockingQueue.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Framework/BlockingQueue.cs b/OpenSim/Framework/BlockingQueue.cs index aef1192..fb74a24 100644 --- a/OpenSim/Framework/BlockingQueue.cs +++ b/OpenSim/Framework/BlockingQueue.cs | |||
@@ -76,9 +76,10 @@ namespace OpenSim.Framework | |||
76 | { | 76 | { |
77 | lock (m_queueSync) | 77 | lock (m_queueSync) |
78 | { | 78 | { |
79 | if (m_queue.Count < 1 && m_pqueue.Count < 1) | 79 | bool timedout = false; |
80 | while (m_queue.Count < 1 && m_pqueue.Count < 1 && !timedout) | ||
80 | { | 81 | { |
81 | Monitor.Wait(m_queueSync, msTimeout); | 82 | timedout = Monitor.Wait(m_queueSync, msTimeout); |
82 | } | 83 | } |
83 | 84 | ||
84 | if (m_pqueue.Count > 0) | 85 | if (m_pqueue.Count > 0) |