diff --git a/SmartThreadPool/SmartThreadPool.cs b/SmartThreadPool/SmartThreadPool.cs index af59014..d26ed19 100644 --- a/SmartThreadPool/SmartThreadPool.cs +++ b/SmartThreadPool/SmartThreadPool.cs @@ -524,7 +524,7 @@ namespace Amib.Threading workItem.WorkItemIsQueued(); // If all the threads are busy then try to create a new one - if ((InUseThreads + WaitingCallbacks) > _workerThreads.Count) + if (_currentWorkItemsCount > _workerThreads.Count) { StartThreads(1); }