Browse Source

Factor in opt_queue value into enough work queued or staged.

Con Kolivas 13 years ago
parent
commit
44e81218fd
1 changed files with 4 additions and 3 deletions
  1. 4 3
      cgminer.c

+ 4 - 3
cgminer.c

@@ -2391,9 +2391,10 @@ static void *get_work_thread(void *userdata)
 
 
 	if (!ts)
 	if (!ts)
 		lagging = true;
 		lagging = true;
-	else if (((cs || cq >= opt_queue) && ts >= maxq) ||
-		 ((cs || cq) && tq >= maxq) || clone_available())
-			goto out;
+	if (((cs >= opt_queue || cq >= opt_queue) && ts >= maxq) ||
+	    ((cs >= opt_queue || cq >= opt_queue) && tq >= maxq) ||
+	    clone_available())
+		goto out;
 
 
 	ret_work = make_work();
 	ret_work = make_work();
 	if (wc->thr)
 	if (wc->thr)