mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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
This commit is contained in:
@@ -78,8 +78,6 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||
private OpenSim.Framework.BlockingQueue<PresenceNotification> m_NotifyQueue =
|
||||
new OpenSim.Framework.BlockingQueue<PresenceNotification>();
|
||||
|
||||
Thread m_NotifyThread;
|
||||
|
||||
private IGridServiceCore m_core;
|
||||
|
||||
public event AgentLocationDelegate OnAgentLocation;
|
||||
@@ -96,8 +94,8 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||
{
|
||||
m_core = core;
|
||||
m_core.RegisterInterface<MessageServersConnector>(this);
|
||||
m_NotifyThread = new Thread(new ThreadStart(NotifyQueueRunner));
|
||||
m_NotifyThread.Start();
|
||||
|
||||
Watchdog.StartThread(NotifyQueueRunner, "NotifyQueueRunner", ThreadPriority.Normal, true);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
@@ -427,6 +425,8 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||
{
|
||||
TellMessageServersAboutUserLogoffInternal(presence.agentID);
|
||||
}
|
||||
|
||||
Watchdog.UpdateThread();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user