diff options
author | Justin Clark-Casey (justincc) | 2014-09-05 23:20:59 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-09-05 23:20:59 +0100 |
commit | 41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf (patch) | |
tree | c3f55715685c213673697e09d234e82616f0dc9c /OpenSim/Region/CoreModules/World | |
parent | Make LLUDP output queue refill thread active by default, since load tests hav... (diff) | |
download | opensim-SC_OLD-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.zip opensim-SC_OLD-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.tar.gz opensim-SC_OLD-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.tar.bz2 opensim-SC_OLD-41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf.tar.xz |
For monitoring purposes, start non-timeout tasks (which do not currently use a threadpool) via Watchdog.RunInThread() rather than Util.RunThreadNoTimeout()
The functionality is the same but this allow us to monitor such tasks via "show threads" and abort them for test purposes, etc.
Also extends thread names to provide more info (e.g. SendInitialDataToClient says what client the task is for).
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
3 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index c8056d4..3e0c9f3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -36,6 +36,7 @@ using System.Xml; | |||
36 | using log4net; | 36 | using log4net; |
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Monitoring; | ||
39 | using OpenSim.Framework.Serialization; | 40 | using OpenSim.Framework.Serialization; |
40 | using OpenSim.Framework.Serialization.External; | 41 | using OpenSim.Framework.Serialization.External; |
41 | using OpenSim.Region.CoreModules.World.Terrain; | 42 | using OpenSim.Region.CoreModules.World.Terrain; |
@@ -371,7 +372,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
371 | // Start the scripts. We delayed this because we want the OAR to finish loading ASAP, so | 372 | // Start the scripts. We delayed this because we want the OAR to finish loading ASAP, so |
372 | // that users can enter the scene. If we allow the scripts to start in the loop above | 373 | // that users can enter the scene. If we allow the scripts to start in the loop above |
373 | // then they significantly increase the time until the OAR finishes loading. | 374 | // then they significantly increase the time until the OAR finishes loading. |
374 | Util.RunThreadNoTimeout(delegate(object o) | 375 | Watchdog.RunInThread(o => |
375 | { | 376 | { |
376 | Thread.Sleep(15000); | 377 | Thread.Sleep(15000); |
377 | m_log.Info("[ARCHIVER]: Starting scripts in scene objects"); | 378 | m_log.Info("[ARCHIVER]: Starting scripts in scene objects"); |
@@ -386,7 +387,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
386 | 387 | ||
387 | sceneContext.SceneObjects.Clear(); | 388 | sceneContext.SceneObjects.Clear(); |
388 | } | 389 | } |
389 | }, "ReadArchiveStartScripts", null); | 390 | }, string.Format("ReadArchiveStartScripts (request {0})", m_requestId), null); |
390 | 391 | ||
391 | m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive"); | 392 | m_log.InfoFormat("[ARCHIVER]: Successfully loaded archive"); |
392 | 393 | ||
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs index 448147a..803f24e 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequest.cs | |||
@@ -36,6 +36,7 @@ using System.Xml; | |||
36 | using log4net; | 36 | using log4net; |
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Monitoring; | ||
39 | using OpenSim.Framework.Serialization; | 40 | using OpenSim.Framework.Serialization; |
40 | using OpenSim.Region.CoreModules.World.Terrain; | 41 | using OpenSim.Region.CoreModules.World.Terrain; |
41 | using OpenSim.Region.Framework.Interfaces; | 42 | using OpenSim.Region.Framework.Interfaces; |
@@ -199,7 +200,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
199 | m_rootScene.AssetService, m_rootScene.UserAccountService, | 200 | m_rootScene.AssetService, m_rootScene.UserAccountService, |
200 | m_rootScene.RegionInfo.ScopeID, options, ReceivedAllAssets); | 201 | m_rootScene.RegionInfo.ScopeID, options, ReceivedAllAssets); |
201 | 202 | ||
202 | Util.RunThreadNoTimeout(o => ar.Execute(), "AssetsRequest", null); | 203 | Watchdog.RunInThread(o => ar.Execute(), "Archive Assets Request", null); |
203 | 204 | ||
204 | // CloseArchive() will be called from ReceivedAllAssets() | 205 | // CloseArchive() will be called from ReceivedAllAssets() |
205 | } | 206 | } |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 4f428c3..ec39bc0 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | |||
@@ -33,6 +33,7 @@ using System.Timers; | |||
33 | using log4net; | 33 | using log4net; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Monitoring; | ||
36 | using OpenSim.Framework.Serialization; | 37 | using OpenSim.Framework.Serialization; |
37 | using OpenSim.Framework.Serialization.External; | 38 | using OpenSim.Framework.Serialization.External; |
38 | using OpenSim.Services.Interfaces; | 39 | using OpenSim.Services.Interfaces; |
@@ -226,7 +227,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
226 | finally | 227 | finally |
227 | { | 228 | { |
228 | if (timedOut) | 229 | if (timedOut) |
229 | Util.RunThreadNoTimeout(PerformAssetsRequestCallback, "AssetsRequestCallback", true); | 230 | Watchdog.RunInThread(PerformAssetsRequestCallback, "Archive Assets Request Callback", true); |
230 | } | 231 | } |
231 | } | 232 | } |
232 | 233 | ||
@@ -295,7 +296,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
295 | 296 | ||
296 | // We want to stop using the asset cache thread asap | 297 | // We want to stop using the asset cache thread asap |
297 | // as we now need to do the work of producing the rest of the archive | 298 | // as we now need to do the work of producing the rest of the archive |
298 | Util.RunThreadNoTimeout(PerformAssetsRequestCallback, "AssetsRequestCallback", false); | 299 | Watchdog.RunInThread(PerformAssetsRequestCallback, "Archive Assets Request Callback", false); |
299 | } | 300 | } |
300 | else | 301 | else |
301 | { | 302 | { |