aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
index 4058229..e75b705 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs
@@ -57,24 +57,35 @@ namespace OpenSim.Framework.Servers.HttpServer
57 private bool m_running = true; 57 private bool m_running = true;
58 private int slowCount = 0; 58 private int slowCount = 0;
59 59
60 private SmartThreadPool m_threadPool = new SmartThreadPool(20000, 12, 2); 60 private SmartThreadPool m_threadPool;
61 61
62 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout) 62 public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
63 { 63 {
64 m_server = pSrv; 64 m_server = pSrv;
65 m_WorkerThreadCount = pWorkerThreadCount; 65 m_WorkerThreadCount = pWorkerThreadCount;
66 m_workerThreads = new Thread[m_WorkerThreadCount]; 66 m_workerThreads = new Thread[m_WorkerThreadCount];
67
68 STPStartInfo startInfo = new STPStartInfo();
69 startInfo.IdleTimeout = 30000;
70 startInfo.MaxWorkerThreads = 15;
71 startInfo.MinWorkerThreads = 1;
72 startInfo.ThreadPriority = ThreadPriority.Normal;
73 startInfo.StartSuspended = true;
74 startInfo.ThreadPoolName = "PoolService";
75
76 m_threadPool = new SmartThreadPool(startInfo);
67 } 77 }
68 78
69 public void Start() 79 public void Start()
70 { 80 {
81 m_threadPool.Start();
71 //startup worker threads 82 //startup worker threads
72 for (uint i = 0; i < m_WorkerThreadCount; i++) 83 for (uint i = 0; i < m_WorkerThreadCount; i++)
73 { 84 {
74 m_workerThreads[i] 85 m_workerThreads[i]
75 = Watchdog.StartThread( 86 = Watchdog.StartThread(
76 PoolWorkerJob, 87 PoolWorkerJob,
77 string.Format("PollServiceWorkerThread{0}:{1}", i, m_server.Port), 88 string.Format("PollServiceWorkerThread {0}:{1}", i, m_server.Port),
78 ThreadPriority.Normal, 89 ThreadPriority.Normal,
79 false, 90 false,
80 false, 91 false,