mirror of
https://github.com/farcasclaudiu/SmartThreadPool.git
synced 2026-06-28 17:01:15 +03:00
Fixed thread creation when queuing many work items at the same time.
This solves item 2966 (http://smartthreadpool.codeplex.com/workitem/2966) reported by Raccoon and etichy.
This commit is contained in:
@@ -524,7 +524,7 @@ namespace Amib.Threading
|
|||||||
workItem.WorkItemIsQueued();
|
workItem.WorkItemIsQueued();
|
||||||
|
|
||||||
// If all the threads are busy then try to create a new one
|
// If all the threads are busy then try to create a new one
|
||||||
if ((InUseThreads + WaitingCallbacks) > _workerThreads.Count)
|
if (_currentWorkItemsCount > _workerThreads.Count)
|
||||||
{
|
{
|
||||||
StartThreads(1);
|
StartThreads(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user