Beispiel #1
0
 /// <summary>
 /// Initializes the ThreadPool. Note: if the threadpool is configured for delayed
 /// initialization then threads aren't created until the the first work is added
 /// to the threadpool queue.
 /// </summary>
 private void Init()
 {
     LogInfo("ThreadPool.Init()");
     _cancelWaitHandle.Reset();
     ThreadPoolStartInfo.Validate(_startInfo);
     _inUseThreads   = 0;
     _itemsProcessed = 0;
     if (!_startInfo.DelayedInit)
     {
         StartThreads(GetOptimalThreadCount());
     }
 }