Commit 732baa18128e9fa023e9bbe3f4c71bfc39165f5c

Con Kolivas 2011-07-08T06:12:38

Use the wakeup thread as a watchdog to ensure we don't fall between the holes of queue and dequeue.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/main.c b/main.c
index e8851ce..60ece4c 100644
--- a/main.c
+++ b/main.c
@@ -1537,6 +1537,8 @@ static void *wakeup_thread(void *userdata)
 
 	while (1) {
 		sleep(interval);
+		if (!requests_queued())
+			queue_request();
 		hashmeter(-1, &zero_tv, 0);
 		if (unlikely(work_restart[stage_thr_id].restart)) {
 			restart_threads(false);