aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/LocklessQueue.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/LocklessQueue.cs')
-rw-r--r--OpenSim/Framework/LocklessQueue.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Framework/LocklessQueue.cs b/OpenSim/Framework/LocklessQueue.cs
index 9bd9baf..7ccbba7 100644
--- a/OpenSim/Framework/LocklessQueue.cs
+++ b/OpenSim/Framework/LocklessQueue.cs
@@ -93,7 +93,10 @@ namespace OpenSim.Framework
93 if (oldHead == oldTail) 93 if (oldHead == oldTail)
94 { 94 {
95 if (oldHeadNext == null) 95 if (oldHeadNext == null)
96 {
97 count = 0;
96 return false; 98 return false;
99 }
97 100
98 CAS(ref tail, oldTail, oldHeadNext); 101 CAS(ref tail, oldTail, oldHeadNext);
99 } 102 }
@@ -118,8 +121,7 @@ namespace OpenSim.Framework
118 { 121 {
119 // ugly 122 // ugly
120 T item; 123 T item;
121 while(count > 0) 124 while(Dequeue(out item));
122 Dequeue(out item);
123 Init(); 125 Init();
124 } 126 }
125 127