mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Add a way to put things at the front of the queue for any throttle group.
Adds a DoubleLocklessQueue and uses it for the outgoing buckets. Added a flag value to the Throttle Type (again) because although it's hacky, it's the best of a bad bunch to get the message through the UDP stack to where it's needed.
This commit is contained in:
@@ -29,7 +29,7 @@ using System.Threading;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
public sealed class LocklessQueue<T>
|
||||
public class LocklessQueue<T>
|
||||
{
|
||||
private sealed class SingleLinkNode
|
||||
{
|
||||
@@ -41,7 +41,7 @@ namespace OpenSim.Framework
|
||||
SingleLinkNode tail;
|
||||
int count;
|
||||
|
||||
public int Count { get { return count; } }
|
||||
public virtual int Count { get { return count; } }
|
||||
|
||||
public LocklessQueue()
|
||||
{
|
||||
@@ -76,7 +76,7 @@ namespace OpenSim.Framework
|
||||
Interlocked.Increment(ref count);
|
||||
}
|
||||
|
||||
public bool Dequeue(out T item)
|
||||
public virtual bool Dequeue(out T item)
|
||||
{
|
||||
item = default(T);
|
||||
SingleLinkNode oldHead = null;
|
||||
@@ -136,4 +136,4 @@ namespace OpenSim.Framework
|
||||
(object)Interlocked.CompareExchange<SingleLinkNode>(ref location, newValue, comparand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ namespace OpenSim.Framework
|
||||
Texture = 5,
|
||||
/// <summary>Non-texture assets</summary>
|
||||
Asset = 6,
|
||||
|
||||
HighPriority = 128,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
||||
Reference in New Issue
Block a user