diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | 15 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 2 |
2 files changed, 14 insertions, 3 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, |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index b8b78fa..d807e2a 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -1850,7 +1850,7 @@ namespace OpenSim.Framework | |||
1850 | 1850 | ||
1851 | STPStartInfo startInfo = new STPStartInfo(); | 1851 | STPStartInfo startInfo = new STPStartInfo(); |
1852 | startInfo.ThreadPoolName = "Util"; | 1852 | startInfo.ThreadPoolName = "Util"; |
1853 | startInfo.IdleTimeout = 2000; | 1853 | startInfo.IdleTimeout = 20000; |
1854 | startInfo.MaxWorkerThreads = maxThreads; | 1854 | startInfo.MaxWorkerThreads = maxThreads; |
1855 | startInfo.MinWorkerThreads = minThreads; | 1855 | startInfo.MinWorkerThreads = minThreads; |
1856 | 1856 | ||