SetMaxThreads() public static method

public static SetMaxThreads ( int workerThreads, int completionPortThreads ) : bool
workerThreads int
completionPortThreads int
return bool
Esempio n. 1
0
 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;
 }