aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-22 12:33:23 -0700
committerJohn Hurliman2009-10-22 12:33:23 -0700
commitb2ed348aa2746fbf034b713d006e40366c479d5a (patch)
tree26c114e88f54e64e1fdf17dcc7de1e54165db2bc /OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.zip
opensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.gz
opensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.bz2
opensim-SC_OLD-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.xz
Implemented a Watchdog class. Do not manually create Thread objects anymore, use Watchdog.StartThread(). While your thread is running call Watchdog.UpdateThread(). When it is shutting down call Watchdog.RemoveThread(). Most of the threads in OpenSim have been updated
Diffstat (limited to 'OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs')
-rw-r--r--OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs
index 8ce353c..f24cef6 100644
--- a/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs
+++ b/OpenSim/Grid/UserServer.Modules/MessageServersConnector.cs
@@ -78,8 +78,6 @@ namespace OpenSim.Grid.UserServer.Modules
78 private OpenSim.Framework.BlockingQueue<PresenceNotification> m_NotifyQueue = 78 private OpenSim.Framework.BlockingQueue<PresenceNotification> m_NotifyQueue =
79 new OpenSim.Framework.BlockingQueue<PresenceNotification>(); 79 new OpenSim.Framework.BlockingQueue<PresenceNotification>();
80 80
81 Thread m_NotifyThread;
82
83 private IGridServiceCore m_core; 81 private IGridServiceCore m_core;
84 82
85 public event AgentLocationDelegate OnAgentLocation; 83 public event AgentLocationDelegate OnAgentLocation;
@@ -96,8 +94,8 @@ namespace OpenSim.Grid.UserServer.Modules
96 { 94 {
97 m_core = core; 95 m_core = core;
98 m_core.RegisterInterface<MessageServersConnector>(this); 96 m_core.RegisterInterface<MessageServersConnector>(this);
99 m_NotifyThread = new Thread(new ThreadStart(NotifyQueueRunner)); 97
100 m_NotifyThread.Start(); 98 Watchdog.StartThread(NotifyQueueRunner, "NotifyQueueRunner", ThreadPriority.Normal, true);
101 } 99 }
102 100
103 public void PostInitialise() 101 public void PostInitialise()
@@ -427,6 +425,8 @@ namespace OpenSim.Grid.UserServer.Modules
427 { 425 {
428 TellMessageServersAboutUserLogoffInternal(presence.agentID); 426 TellMessageServersAboutUserLogoffInternal(presence.agentID);
429 } 427 }
428
429 Watchdog.UpdateThread();
430 } 430 }
431 } 431 }
432 432