diff options
author | John Hurliman | 2009-10-22 12:33:23 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-22 12:33:23 -0700 |
commit | b2ed348aa2746fbf034b713d006e40366c479d5a (patch) | |
tree | 26c114e88f54e64e1fdf17dcc7de1e54165db2bc /OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-b2ed348aa2746fbf034b713d006e40366c479d5a.zip opensim-SC-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.gz opensim-SC-b2ed348aa2746fbf034b713d006e40366c479d5a.tar.bz2 opensim-SC-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/Framework/Servers/HttpServer/PollServiceRequestManager.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index 1c54581..e7a64f7 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | |||
@@ -50,9 +50,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
50 | m_WorkerThreadCount = pWorkerThreadCount; | 50 | m_WorkerThreadCount = pWorkerThreadCount; |
51 | m_workerThreads = new Thread[m_WorkerThreadCount]; | 51 | m_workerThreads = new Thread[m_WorkerThreadCount]; |
52 | m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount]; | 52 | m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount]; |
53 | m_watcherThread = new Thread(ThreadStart); | ||
54 | 53 | ||
55 | |||
56 | //startup worker threads | 54 | //startup worker threads |
57 | for (uint i=0;i<m_WorkerThreadCount;i++) | 55 | for (uint i=0;i<m_WorkerThreadCount;i++) |
58 | { | 56 | { |
@@ -65,11 +63,11 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
65 | m_workerThreads[i].Start(); | 63 | m_workerThreads[i].Start(); |
66 | 64 | ||
67 | } | 65 | } |
66 | |||
68 | //start watcher threads | 67 | //start watcher threads |
68 | m_watcherThread = new Thread(ThreadStart); | ||
69 | m_watcherThread.Name = "PollServiceWatcherThread"; | 69 | m_watcherThread.Name = "PollServiceWatcherThread"; |
70 | m_watcherThread.Start(); | 70 | m_watcherThread.Start(); |
71 | |||
72 | |||
73 | } | 71 | } |
74 | 72 | ||
75 | internal void ReQueueEvent(PollServiceHttpRequest req) | 73 | internal void ReQueueEvent(PollServiceHttpRequest req) |