aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs
diff options
context:
space:
mode:
authorMic Bowman2011-04-12 12:36:36 -0700
committerMic Bowman2011-04-12 15:58:57 -0700
commit69d014e1dcb0e05a4ec927a5501156627856bccb (patch)
treeef11b839619523c071f9476aece87cb057348a94 /OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs
parentNew tokenbucket algorithm. This one provides fair sharing of the queues (diff)
downloadopensim-SC_OLD-69d014e1dcb0e05a4ec927a5501156627856bccb.zip
opensim-SC_OLD-69d014e1dcb0e05a4ec927a5501156627856bccb.tar.gz
opensim-SC_OLD-69d014e1dcb0e05a4ec927a5501156627856bccb.tar.bz2
opensim-SC_OLD-69d014e1dcb0e05a4ec927a5501156627856bccb.tar.xz
First pass at moving object property requests into a queue similar
to the entity update queue. The number of property packets can become significant when selecting/deselecting large numbers of objects. This is experimental code.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs
index 364ce4b..6521a00 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/PriorityQueue.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
78 } 78 }
79 } 79 }
80 80
81 public bool Enqueue(uint pqueue, EntityUpdate value) 81 public bool Enqueue(uint pqueue, IEntityUpdate value)
82 { 82 {
83 LookupItem lookup; 83 LookupItem lookup;
84 84
@@ -99,7 +99,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
99 return true; 99 return true;
100 } 100 }
101 101
102 internal bool TryDequeue(out EntityUpdate value, out Int32 timeinqueue) 102 internal bool TryDequeue(out IEntityUpdate value, out Int32 timeinqueue)
103 { 103 {
104 for (int i = 0; i < m_numberOfQueues; ++i) 104 for (int i = 0; i < m_numberOfQueues; ++i)
105 { 105 {
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
122 } 122 }
123 123
124 timeinqueue = 0; 124 timeinqueue = 0;
125 value = default(EntityUpdate); 125 value = default(IEntityUpdate);
126 return false; 126 return false;
127 } 127 }
128 128
@@ -175,8 +175,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
175#region MinHeapItem 175#region MinHeapItem
176 private struct MinHeapItem : IComparable<MinHeapItem> 176 private struct MinHeapItem : IComparable<MinHeapItem>
177 { 177 {
178 private EntityUpdate value; 178 private IEntityUpdate value;
179 internal EntityUpdate Value { 179 internal IEntityUpdate Value {
180 get { 180 get {
181 return this.value; 181 return this.value;
182 } 182 }
@@ -212,7 +212,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
212 this.pqueue = pqueue; 212 this.pqueue = pqueue;
213 } 213 }
214 214
215 internal MinHeapItem(uint pqueue, UInt64 entryorder, EntityUpdate value) 215 internal MinHeapItem(uint pqueue, UInt64 entryorder, IEntityUpdate value)
216 { 216 {
217 this.entrytime = Util.EnvironmentTickCount(); 217 this.entrytime = Util.EnvironmentTickCount();
218 this.entryorder = entryorder; 218 this.entryorder = entryorder;