private static ThreadPool GetThreadPool(ThreadPoolName uniqueId)
{
uniqueId = TranslatePool(uniqueId);
ThreadPool currentPool;
lock (threadPool)
{
if (!threadPool.TryGetValue(uniqueId, out currentPool))
{
currentPool = new ThreadPool(uniqueId.ToString());
threadPool[uniqueId] = currentPool;
currentPool.SetMaxThreads(10);
}
}
return currentPool;
}