|
|
@@ -3303,20 +3303,13 @@ static void *miner_thread(void *userdata)
|
|
|
bool needs_work = true;
|
|
|
/* Try to cycle approximately 5 times before each log update */
|
|
|
const unsigned long cycle = opt_log_interval / 5 ? : 1;
|
|
|
- int request_interval;
|
|
|
+ unsigned const int request_interval = opt_scantime * 2 / 3 ? : 1;
|
|
|
bool requested = false;
|
|
|
uint32_t nonce_inc = max_nonce, hash_div = 1;
|
|
|
double hash_divfloat = 1.0;
|
|
|
|
|
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
|
|
|
|
|
- /* Request the next work item just before the end of the scantime. We
|
|
|
- * don't want the work lying around too long since the CPU will always
|
|
|
- * spend the full scantime */
|
|
|
- request_interval = opt_scantime - 5;
|
|
|
- if (request_interval < 1)
|
|
|
- request_interval = 1;
|
|
|
-
|
|
|
/* Set worker threads to nice 19 and then preferentially to SCHED_IDLE
|
|
|
* and if that fails, then SCHED_BATCH. No need for this to be an
|
|
|
* error if it fails */
|