Commit 44e81218fd19f0158e1fd2a02fc312c67bbb4cc0

Con Kolivas 2012-08-15T22:56:18

Factor in opt_queue value into enough work queued or staged.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/cgminer.c b/cgminer.c
index 2a44708..a71f3dd 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -2391,9 +2391,10 @@ static void *get_work_thread(void *userdata)
 
 	if (!ts)
 		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();
 	if (wc->thr)