counting issus safeguard
parent
35b37510fc
commit
e21ac8b3c4
|
@ -93,7 +93,10 @@ namespace OpenSim.Framework
|
||||||
if (oldHead == oldTail)
|
if (oldHead == oldTail)
|
||||||
{
|
{
|
||||||
if (oldHeadNext == null)
|
if (oldHeadNext == null)
|
||||||
|
{
|
||||||
|
count = 0;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
CAS(ref tail, oldTail, oldHeadNext);
|
CAS(ref tail, oldTail, oldHeadNext);
|
||||||
}
|
}
|
||||||
|
@ -118,8 +121,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
// ugly
|
// ugly
|
||||||
T item;
|
T item;
|
||||||
while(count > 0)
|
while(Dequeue(out item));
|
||||||
Dequeue(out item);
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue