diff options
author | Justin Clark-Casey (justincc) | 2014-11-25 23:56:32 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-11-25 23:56:32 +0000 |
commit | 86367d7219b3bd52f63045b2b17bcbde328844ed (patch) | |
tree | 789227d95cb152a437481e741b55d86dfeba9f74 /OpenSim/Framework/Servers | |
parent | Fix ghosts copy of SimulatorFeatureModule to enable logging. (diff) | |
download | opensim-SC-86367d7219b3bd52f63045b2b17bcbde328844ed.zip opensim-SC-86367d7219b3bd52f63045b2b17bcbde328844ed.tar.gz opensim-SC-86367d7219b3bd52f63045b2b17bcbde328844ed.tar.bz2 opensim-SC-86367d7219b3bd52f63045b2b17bcbde328844ed.tar.xz |
refactor: Move methods to start a monitored thread, start work in its own thread and run work in the jobengine from Watchdog to a WorkManager class.
This is to achieve a clean separation of concerns - the watchdog is an inappropriate place for work management.
Also adds a WorkManager.RunInThreadPool() class which feeds through to Util.FireAndForget.
Also switches around the name and obj arguments to the new RunInThread() and RunJob() methods so that the callback obj comes after the callback as seen in the SDK and elsewhere
Diffstat (limited to 'OpenSim/Framework/Servers')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index 4561d23..28bba70 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
120 | for (uint i = 0; i < m_WorkerThreadCount; i++) | 120 | for (uint i = 0; i < m_WorkerThreadCount; i++) |
121 | { | 121 | { |
122 | m_workerThreads[i] | 122 | m_workerThreads[i] |
123 | = Watchdog.StartThread( | 123 | = WorkManager.StartThread( |
124 | PoolWorkerJob, | 124 | PoolWorkerJob, |
125 | string.Format("PollServiceWorkerThread{0}:{1}", i, m_server.Port), | 125 | string.Format("PollServiceWorkerThread{0}:{1}", i, m_server.Port), |
126 | ThreadPriority.Normal, | 126 | ThreadPriority.Normal, |
@@ -130,7 +130,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
130 | int.MaxValue); | 130 | int.MaxValue); |
131 | } | 131 | } |
132 | 132 | ||
133 | Watchdog.StartThread( | 133 | WorkManager.StartThread( |
134 | this.CheckLongPollThreads, | 134 | this.CheckLongPollThreads, |
135 | string.Format("LongPollServiceWatcherThread:{0}", m_server.Port), | 135 | string.Format("LongPollServiceWatcherThread:{0}", m_server.Port), |
136 | ThreadPriority.Normal, | 136 | ThreadPriority.Normal, |