aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorUbitUmarov2017-07-10 22:01:38 +0100
committerUbitUmarov2017-07-10 22:01:38 +0100
commit40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1 (patch)
tree1c9c9073397754a671fb2a4547394177b756b6db /OpenSim/Framework
parenta few more changes on entities updates (diff)
downloadopensim-SC-40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1.zip
opensim-SC-40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1.tar.gz
opensim-SC-40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1.tar.bz2
opensim-SC-40b16f1705bd6361d7fd0cd2bc458ae9ea381bf1.tar.xz
SimpleAngularDistance update prioritization scheme ameks no sense without ordered dequeue of the updates
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/PriorityQueue.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Framework/PriorityQueue.cs b/OpenSim/Framework/PriorityQueue.cs
index 5b9185e..22ffcdc 100644
--- a/OpenSim/Framework/PriorityQueue.cs
+++ b/OpenSim/Framework/PriorityQueue.cs
@@ -216,6 +216,27 @@ namespace OpenSim.Framework
216 return false; 216 return false;
217 } 217 }
218 218
219 public bool TryOrderedDequeue(out EntityUpdate value, out Int32 timeinqueue)
220 {
221 // If there is anything in imediate queues, return it first no
222 // matter what else. Breaks fairness. But very useful.
223 for (int iq = 0; iq < NumberOfQueues; iq++)
224 {
225 if (m_heaps[iq].Count > 0)
226 {
227 MinHeapItem item = m_heaps[iq].RemoveMin();
228 m_lookupTable.Remove(item.Value.Entity.LocalId);
229 timeinqueue = Util.EnvironmentTickCountSubtract(item.EntryTime);
230 value = item.Value;
231 return true;
232 }
233 }
234
235 timeinqueue = 0;
236 value = default(EntityUpdate);
237 return false;
238 }
239
219 /// <summary> 240 /// <summary>
220 /// Reapply the prioritization function to each of the updates currently 241 /// Reapply the prioritization function to each of the updates currently
221 /// stored in the priority queues. 242 /// stored in the priority queues.