System.Threading.ThreadPool.SetMaxThreads C# (CSharp) Method

SetMaxThreads() public static method

public static SetMaxThreads ( int workerThreads, int completionPortThreads ) : bool
workerThreads int
completionPortThreads int
return bool
        public static bool SetMaxThreads(int workerThreads, int completionPortThreads)
        {
            throw null;
        }

Usage Example

コード例 #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;
 }