aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-09-05 23:20:59 +0100
committerJustin Clark-Casey (justincc)2014-09-05 23:20:59 +0100
commit41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf (patch)
treec3f55715685c213673697e09d234e82616f0dc9c /OpenSim/Region/Framework/Scenes
parentMake LLUDP output queue refill thread active by default, since load tests hav... (diff)
downloadopensim-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/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs17
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
2 files changed, 10 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5f0dbd7..28dbccb 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1623,7 +1623,12 @@ namespace OpenSim.Region.Framework.Scenes
1623 { 1623 {
1624 tmpMS = Util.EnvironmentTickCount(); 1624 tmpMS = Util.EnvironmentTickCount();
1625 m_cleaningTemps = true; 1625 m_cleaningTemps = true;
1626 Util.RunThreadNoTimeout(delegate { CleanTempObjects(); m_cleaningTemps = false; }, "CleanTempObjects", null); 1626
1627 Watchdog.RunInThread(
1628 delegate { CleanTempObjects(); m_cleaningTemps = false; },
1629 string.Format("CleanTempObjects ({0})", Name),
1630 null);
1631
1627 tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpMS); 1632 tempOnRezMS = Util.EnvironmentTickCountSubtract(tmpMS);
1628 } 1633 }
1629 1634
@@ -1803,7 +1808,7 @@ namespace OpenSim.Region.Framework.Scenes
1803 if (!m_backingup) 1808 if (!m_backingup)
1804 { 1809 {
1805 m_backingup = true; 1810 m_backingup = true;
1806 Util.RunThreadNoTimeout(BackupWaitCallback, "BackupWaitCallback", null); 1811 Watchdog.RunInThread(o => Backup(false), string.Format("BackupWaitCallback ({0})", Name), null);
1807 } 1812 }
1808 } 1813 }
1809 1814
@@ -1814,14 +1819,6 @@ namespace OpenSim.Region.Framework.Scenes
1814 { 1819 {
1815 m_eventManager.TriggerOnFrame(); 1820 m_eventManager.TriggerOnFrame();
1816 } 1821 }
1817
1818 /// <summary>
1819 /// Wrapper for Backup() that can be called with Util.RunThreadNoTimeout()
1820 /// </summary>
1821 private void BackupWaitCallback(object o)
1822 {
1823 Backup(false);
1824 }
1825 1822
1826 /// <summary> 1823 /// <summary>
1827 /// Backup the scene. 1824 /// Backup the scene.
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3c37de8..59b521d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -37,6 +37,7 @@ using log4net;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Client; 39using OpenSim.Framework.Client;
40using OpenSim.Framework.Monitoring;
40using OpenSim.Region.Framework.Interfaces; 41using OpenSim.Region.Framework.Interfaces;
41using OpenSim.Region.Framework.Scenes.Animation; 42using OpenSim.Region.Framework.Scenes.Animation;
42using OpenSim.Region.Framework.Scenes.Types; 43using OpenSim.Region.Framework.Scenes.Types;
@@ -3362,7 +3363,7 @@ namespace OpenSim.Region.Framework.Scenes
3362 SentInitialDataToClient = true; 3363 SentInitialDataToClient = true;
3363 3364
3364 // Send all scene object to the new client 3365 // Send all scene object to the new client
3365 Util.RunThreadNoTimeout(delegate 3366 Watchdog.RunInThread(delegate
3366 { 3367 {
3367// m_log.DebugFormat( 3368// m_log.DebugFormat(
3368// "[SCENE PRESENCE]: Sending initial data to {0} agent {1} in {2}, tp flags {3}", 3369// "[SCENE PRESENCE]: Sending initial data to {0} agent {1} in {2}, tp flags {3}",
@@ -3380,8 +3381,7 @@ namespace OpenSim.Region.Framework.Scenes
3380 if (e != null && e is SceneObjectGroup) 3381 if (e != null && e is SceneObjectGroup)
3381 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient); 3382 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
3382 } 3383 }
3383 3384 }, string.Format("SendInitialDataToClient ({0} in {1})", Name, Scene.Name), null);
3384 }, "SendInitialDataToClient", null);
3385 } 3385 }
3386 3386
3387 /// <summary> 3387 /// <summary>