aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-11-25 23:56:32 +0000
committerJustin Clark-Casey (justincc)2014-11-25 23:56:32 +0000
commit86367d7219b3bd52f63045b2b17bcbde328844ed (patch)
tree789227d95cb152a437481e741b55d86dfeba9f74 /OpenSim/Region/ClientStack/Linden
parentFix ghosts copy of SimulatorFeatureModule to enable logging. (diff)
downloadopensim-SC_OLD-86367d7219b3bd52f63045b2b17bcbde328844ed.zip
opensim-SC_OLD-86367d7219b3bd52f63045b2b17bcbde328844ed.tar.gz
opensim-SC_OLD-86367d7219b3bd52f63045b2b17bcbde328844ed.tar.bz2
opensim-SC_OLD-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/Region/ClientStack/Linden')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/IncomingPacketAsyncHandlingEngine.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OutgoingQueueRefillEngine.cs2
4 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index 87192a0..84ca4bb 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -207,7 +207,7 @@ namespace OpenSim.Region.ClientStack.Linden
207 207
208 for (uint i = 0; i < 2; i++) 208 for (uint i = 0; i < 2; i++)
209 { 209 {
210 m_workerThreads[i] = Watchdog.StartThread(DoInventoryRequests, 210 m_workerThreads[i] = WorkManager.StartThread(DoInventoryRequests,
211 String.Format("InventoryWorkerThread{0}", i), 211 String.Format("InventoryWorkerThread{0}", i),
212 ThreadPriority.Normal, 212 ThreadPriority.Normal,
213 false, 213 false,
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacketAsyncHandlingEngine.cs b/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacketAsyncHandlingEngine.cs
index 874ddae..6f40b24 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacketAsyncHandlingEngine.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacketAsyncHandlingEngine.cs
@@ -132,7 +132,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
132 132
133 StatsManager.RegisterStat(m_requestsWaitingStat); 133 StatsManager.RegisterStat(m_requestsWaitingStat);
134 134
135 Watchdog.StartThread( 135 WorkManager.StartThread(
136 ProcessRequests, 136 ProcessRequests,
137 string.Format("Incoming Packet Async Handling Engine Thread ({0})", m_udpServer.Scene.Name), 137 string.Format("Incoming Packet Async Handling Engine Thread ({0})", m_udpServer.Scene.Name),
138 ThreadPriority.Normal, 138 ThreadPriority.Normal,
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index d8cf7a5..2f97516 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -483,7 +483,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
483 base.StartInbound(m_recvBufferSize, m_asyncPacketHandling); 483 base.StartInbound(m_recvBufferSize, m_asyncPacketHandling);
484 484
485 // This thread will process the packets received that are placed on the packetInbox 485 // This thread will process the packets received that are placed on the packetInbox
486 Watchdog.StartThread( 486 WorkManager.StartThread(
487 IncomingPacketHandler, 487 IncomingPacketHandler,
488 string.Format("Incoming Packets ({0})", Scene.Name), 488 string.Format("Incoming Packets ({0})", Scene.Name),
489 ThreadPriority.Normal, 489 ThreadPriority.Normal,
@@ -499,7 +499,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
499 499
500 base.StartOutbound(); 500 base.StartOutbound();
501 501
502 Watchdog.StartThread( 502 WorkManager.StartThread(
503 OutgoingPacketHandler, 503 OutgoingPacketHandler,
504 string.Format("Outgoing Packets ({0})", Scene.Name), 504 string.Format("Outgoing Packets ({0})", Scene.Name),
505 ThreadPriority.Normal, 505 ThreadPriority.Normal,
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OutgoingQueueRefillEngine.cs b/OpenSim/Region/ClientStack/Linden/UDP/OutgoingQueueRefillEngine.cs
index 2ec1733..1e915c3 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OutgoingQueueRefillEngine.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OutgoingQueueRefillEngine.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
124 124
125 StatsManager.RegisterStat(m_oqreRequestsWaitingStat); 125 StatsManager.RegisterStat(m_oqreRequestsWaitingStat);
126 126
127 Watchdog.StartThread( 127 WorkManager.StartThread(
128 ProcessRequests, 128 ProcessRequests,
129 String.Format("OutgoingQueueRefillEngineThread ({0})", m_udpServer.Scene.Name), 129 String.Format("OutgoingQueueRefillEngineThread ({0})", m_udpServer.Scene.Name),
130 ThreadPriority.Normal, 130 ThreadPriority.Normal,