Просмотр исходного кода

Fixed ThreadPool not removing unused threads

MarcoROG 8 лет назад
Родитель
Сommit
caab3c8c6b
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      Source/BansheeUtility/Source/BsThreadPool.cpp

+ 4 - 1
Source/BansheeUtility/Source/BsThreadPool.cpp

@@ -261,8 +261,11 @@ namespace bs
 
 		for(auto& thread : idleThreads)
 		{
-			if(i < limit)
+			if (i < limit)
+			{
 				mThreads.push_back(thread);
+				i++;
+			}
 			else
 				destroyThread(thread);
 		}