aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 4e40084..a4bcbad 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -74,7 +74,6 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
74 private Dictionary<ulong, int> m_blacklistedregions = new Dictionary<ulong, int>(); 74 private Dictionary<ulong, int> m_blacklistedregions = new Dictionary<ulong, int>();
75 private Dictionary<ulong, string> m_cachedRegionMapItemsAddress = new Dictionary<ulong, string>(); 75 private Dictionary<ulong, string> m_cachedRegionMapItemsAddress = new Dictionary<ulong, string>();
76 private List<UUID> m_rootAgents = new List<UUID>(); 76 private List<UUID> m_rootAgents = new List<UUID>();
77 private Thread mapItemReqThread;
78 private volatile bool threadrunning = false; 77 private volatile bool threadrunning = false;
79 78
80 //private int CacheRegionsDistance = 256; 79 //private int CacheRegionsDistance = 256;
@@ -338,13 +337,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
338 { 337 {
339 if (threadrunning) return; 338 if (threadrunning) return;
340 threadrunning = true; 339 threadrunning = true;
340
341 m_log.Debug("[WORLD MAP]: Starting remote MapItem request thread"); 341 m_log.Debug("[WORLD MAP]: Starting remote MapItem request thread");
342 mapItemReqThread = new Thread(new ThreadStart(process)); 342
343 mapItemReqThread.IsBackground = true; 343 Watchdog.StartThread(process, "MapItemRequestThread", ThreadPriority.BelowNormal, true);
344 mapItemReqThread.Name = "MapItemRequestThread";
345 mapItemReqThread.Priority = ThreadPriority.BelowNormal;
346 mapItemReqThread.SetApartmentState(ApartmentState.MTA);
347 mapItemReqThread.Start();
348 } 344 }
349 345
350 /// <summary> 346 /// <summary>
@@ -461,6 +457,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
461 OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); 457 OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
462 RequestMapItemsCompleted(response); 458 RequestMapItemsCompleted(response);
463 } 459 }
460
461 Watchdog.UpdateThread();
464 } 462 }
465 } 463 }
466 catch (Exception e) 464 catch (Exception e)
@@ -469,6 +467,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
469 } 467 }
470 468
471 threadrunning = false; 469 threadrunning = false;
470 Watchdog.RemoveThread();
472 } 471 }
473 472
474 /// <summary> 473 /// <summary>