Browse Source

Increase the time for the waiting for work message to be given to be greater than that required for a pool swap in the scheduler which is set to 5s.

Con Kolivas 12 years ago
parent
commit
e8a1c9ebd1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cgminer.c

+ 2 - 2
cgminer.c

@@ -5619,15 +5619,15 @@ static struct work *hash_pop(void)
 			int rc;
 			int rc;
 
 
 			cgtime(&now);
 			cgtime(&now);
-			then.tv_sec = now.tv_sec + 5;
+			then.tv_sec = now.tv_sec + 10;
 			then.tv_nsec = now.tv_usec * 1000;
 			then.tv_nsec = now.tv_usec * 1000;
 			rc = pthread_cond_timedwait(&getq->cond, stgd_lock, &then);
 			rc = pthread_cond_timedwait(&getq->cond, stgd_lock, &then);
 			/* Check again for !no_work as multiple threads may be
 			/* Check again for !no_work as multiple threads may be
 			 * waiting on this condition and another may set the
 			 * waiting on this condition and another may set the
 			 * bool separately. */
 			 * bool separately. */
 			if (rc && !no_work) {
 			if (rc && !no_work) {
-				applog(LOG_WARNING, "Waiting for work to be available from pools.");
 				no_work = true;
 				no_work = true;
+				applog(LOG_WARNING, "Waiting for work to be available from pools.");
 			}
 			}
 		} else
 		} else
 			pthread_cond_wait(&getq->cond, stgd_lock);
 			pthread_cond_wait(&getq->cond, stgd_lock);