Assign the SmartThreadPool name in the constructor

This is required because some threads are created in the constructor, so assigning the name afterwards would be too late.
This commit is contained in:
Oren Hurvitz
2013-01-04 08:43:05 +02:00
committed by Justin Clark-Casey (justincc)
parent 3eee991935
commit b77da5039e
4 changed files with 30 additions and 5 deletions

View File

@@ -1658,8 +1658,13 @@ namespace OpenSim.Framework
if (m_ThreadPool != null)
throw new InvalidOperationException("SmartThreadPool is already initialized");
m_ThreadPool = new SmartThreadPool(2000, maxThreads, 2);
m_ThreadPool.Name = "Util";
STPStartInfo startInfo = new STPStartInfo();
startInfo.ThreadPoolName = "Util";
startInfo.IdleTimeout = 2000;
startInfo.MaxWorkerThreads = maxThreads;
startInfo.MinWorkerThreads = 2;
m_ThreadPool = new SmartThreadPool(startInfo);
}
public static int FireAndForgetCount()