changeset 86:5d1b72ba44dc

Small fixes in WorkQueue
author Ivo Smits <Ivo@UCIS.nl>
date Thu, 05 Jun 2014 00:24:24 +0200
parents 40715b34d0d3
children 9b898d8b2541
files Util/WorkQueue.cs
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Util/WorkQueue.cs	Thu Jun 05 00:21:23 2014 +0200
+++ b/Util/WorkQueue.cs	Thu Jun 05 00:24:24 2014 +0200
@@ -73,12 +73,12 @@
 			while (true) {
 				TWork item;
 				lock (queue) {
-					if (workers >= maxWorkers) {
+					if (workers > maxWorkers) {
 						workers--;
 						break;
 					}
 					if (queue.Count == 0) {
-						if (idleWorkers >= maxIdleWorkers) {
+						if (idleWorkers > maxIdleWorkers) {
 							workers--;
 							queue.TrimExcess();
 							break;