|
|
|
@ -3529,7 +3529,7 @@ static time_t requested_tv_sec;
@@ -3529,7 +3529,7 @@ static time_t requested_tv_sec;
|
|
|
|
|
|
|
|
|
|
static bool queue_request(struct thr_info *thr, bool needed) |
|
|
|
|
{ |
|
|
|
|
int rq = requests_queued(), rs = requests_staged(); |
|
|
|
|
int toq, rq = requests_queued(), rs = requests_staged(); |
|
|
|
|
struct workio_cmd *wc; |
|
|
|
|
struct timeval now; |
|
|
|
|
time_t scan_post; |
|
|
|
@ -3549,6 +3549,14 @@ static bool queue_request(struct thr_info *thr, bool needed)
@@ -3549,6 +3549,14 @@ static bool queue_request(struct thr_info *thr, bool needed)
|
|
|
|
|
now.tv_sec - requested_tv_sec < scan_post) |
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
requested_tv_sec = now.tv_sec; |
|
|
|
|
|
|
|
|
|
if (rq > rs) |
|
|
|
|
toq = rq - mining_threads; |
|
|
|
|
else |
|
|
|
|
toq = rs - mining_threads; |
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
inc_queued(); |
|
|
|
|
|
|
|
|
|
/* fill out work request message */ |
|
|
|
@ -3579,7 +3587,8 @@ static bool queue_request(struct thr_info *thr, bool needed)
@@ -3579,7 +3587,8 @@ static bool queue_request(struct thr_info *thr, bool needed)
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
requested_tv_sec = now.tv_sec; |
|
|
|
|
} while (--toq > 0); |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|