diff options
author | John Hurliman | 2009-10-21 16:21:08 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-21 16:21:08 -0700 |
commit | b06f258319f088bcf6658880ed371ef313bac3b6 (patch) | |
tree | 938a7e9b2b07e40627acd74723aa1d2c8f661a67 /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |
parent | * Changed the timing calculations for sending resends/acks/pings from per-cli... (diff) | |
download | opensim-SC-b06f258319f088bcf6658880ed371ef313bac3b6.zip opensim-SC-b06f258319f088bcf6658880ed371ef313bac3b6.tar.gz opensim-SC-b06f258319f088bcf6658880ed371ef313bac3b6.tar.bz2 opensim-SC-b06f258319f088bcf6658880ed371ef313bac3b6.tar.xz |
* FireQueueEmpty now checks if a measurable amount of time has passed, and if not it sleeps for a small amount of time. This throttles OnQueueEmpty calls where there is no callback or the callback is doing very little work
* Changed HandleQueueEmpty()'s Monitor.TryEnter() calls to locks. We want to take our time in this function and do all the work necessary, since returning too fast will induce a sleep anyways
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 91afa4d..0bb7a71 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3558,45 +3558,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3558 | ProcessTextureRequests(); | 3558 | ProcessTextureRequests(); |
3559 | break; | 3559 | break; |
3560 | case ThrottleOutPacketType.Task: | 3560 | case ThrottleOutPacketType.Task: |
3561 | if (Monitor.TryEnter(m_avatarTerseUpdates.SyncRoot)) | 3561 | lock (m_avatarTerseUpdates.SyncRoot) |
3562 | { | 3562 | { |
3563 | try | 3563 | if (m_avatarTerseUpdates.Count > 0) |
3564 | { | 3564 | ProcessAvatarTerseUpdates(); |
3565 | if (m_avatarTerseUpdates.Count > 0) | ||
3566 | { | ||
3567 | |||
3568 | ProcessAvatarTerseUpdates(); | ||
3569 | return; | ||
3570 | } | ||
3571 | } | ||
3572 | finally { Monitor.Exit(m_avatarTerseUpdates.SyncRoot); } | ||
3573 | } | 3565 | } |
3574 | break; | 3566 | break; |
3575 | case ThrottleOutPacketType.State: | 3567 | case ThrottleOutPacketType.State: |
3576 | if (Monitor.TryEnter(m_primFullUpdates.SyncRoot)) | 3568 | lock (m_primFullUpdates.SyncRoot) |
3577 | { | 3569 | { |
3578 | try | 3570 | if (m_primFullUpdates.Count > 0) |
3579 | { | 3571 | ProcessPrimFullUpdates(); |
3580 | if (m_primFullUpdates.Count > 0) | ||
3581 | { | ||
3582 | ProcessPrimFullUpdates(); | ||
3583 | return; | ||
3584 | } | ||
3585 | } | ||
3586 | finally { Monitor.Exit(m_primFullUpdates.SyncRoot); } | ||
3587 | } | 3572 | } |
3588 | 3573 | ||
3589 | if (Monitor.TryEnter(m_primTerseUpdates.SyncRoot)) | 3574 | lock (m_primTerseUpdates.SyncRoot) |
3590 | { | 3575 | { |
3591 | try | 3576 | if (m_primTerseUpdates.Count > 0) |
3592 | { | 3577 | ProcessPrimTerseUpdates(); |
3593 | if (m_primTerseUpdates.Count > 0) | ||
3594 | { | ||
3595 | ProcessPrimTerseUpdates(); | ||
3596 | return; | ||
3597 | } | ||
3598 | } | ||
3599 | finally { Monitor.Exit(m_primTerseUpdates.SyncRoot); } | ||
3600 | } | 3578 | } |
3601 | break; | 3579 | break; |
3602 | } | 3580 | } |
@@ -10344,7 +10322,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10344 | { | 10322 | { |
10345 | if (lookup.Heap.ContainsHandle(lookup.Handle)) | 10323 | if (lookup.Heap.ContainsHandle(lookup.Handle)) |
10346 | lookup.Heap[lookup.Handle] = | 10324 | lookup.Heap[lookup.Handle] = |
10347 | new MinHeapItem(priority, item.Value, item.LocalID); | 10325 | new MinHeapItem(priority, item.Value, item.LocalID, this.m_comparison); |
10348 | } | 10326 | } |
10349 | else | 10327 | else |
10350 | { | 10328 | { |