From 7a82c7c5b2a897ba1bd64c2badb71fe93c674246 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 26 May 2017 00:47:08 +0100 Subject: [PATCH] make BlockingQueue.Dequeue timeouts more coerent (just less than watchdog timeout) --- OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | 4 ++-- .../Region/ClientStack/Linden/Caps/GetTextureModule.cs | 4 ++-- .../ClientStack/Linden/Caps/WebFetchInvDescModule.cs | 3 +-- .../Region/CoreModules/World/WorldMap/WorldMapModule.cs | 8 ++++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index 03f0a043c8..a7214549f5 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs @@ -204,10 +204,10 @@ namespace OpenSim.Region.ClientStack.Linden { while(true) { - aPollRequest poolreq = m_queue.Dequeue(1000); + aPollRequest poolreq = m_queue.Dequeue(4500); + Watchdog.UpdateThread(); if(m_NumberScenes <= 0) return; - Watchdog.UpdateThread(); if(poolreq.reqID != UUID.Zero) poolreq.thepoll.Process(poolreq); } diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 8ef943c908..ce9798bef2 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs @@ -415,10 +415,10 @@ namespace OpenSim.Region.ClientStack.Linden { while (true) { - aPollRequest poolreq = m_queue.Dequeue(2000); + aPollRequest poolreq = m_queue.Dequeue(4500); + Watchdog.UpdateThread(); if(m_NumberScenes <= 0) return; - Watchdog.UpdateThread(); if(poolreq.reqID != UUID.Zero) poolreq.thepoll.Process(poolreq); } diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 23ec141b28..a367426288 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -443,10 +443,9 @@ namespace OpenSim.Region.ClientStack.Linden { while (true) { + aPollRequest poolreq = m_queue.Dequeue(4500); Watchdog.UpdateThread(); - aPollRequest poolreq = m_queue.Dequeue(5000); - if (poolreq != null && poolreq.thepoll != null) { try diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 00c82794fb..03a4d3475e 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -716,12 +716,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap { while (true) { - Watchdog.UpdateThread(); - av = null; st = null; - st = requests.Dequeue(4900); // timeout to make watchdog happy + st = requests.Dequeue(4500); + Watchdog.UpdateThread(); if (st == null || st.agentID == UUID.Zero) continue; @@ -1152,10 +1151,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap { while(!m_mapBlockRequestEvent.WaitOne(4900)) { + Watchdog.UpdateThread(); if(m_scene == null) return; } - + Watchdog.UpdateThread(); lock (m_mapBlockRequestEvent) { int total = 0;