mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Only recalculate total_staged in getwork thread if required.
This commit is contained in:
parent
77ef4c210f
commit
84b44fd852
@ -3067,9 +3067,10 @@ static void *getwork_thread(void __maybe_unused *userdata)
|
|||||||
lagging = true;
|
lagging = true;
|
||||||
|
|
||||||
/* Wait until hash_pop tells us we need to create more work */
|
/* Wait until hash_pop tells us we need to create more work */
|
||||||
if (ts > opt_queue)
|
if (ts > opt_queue) {
|
||||||
pthread_cond_wait(&gws_cond, stgd_lock);
|
pthread_cond_wait(&gws_cond, stgd_lock);
|
||||||
ts = __total_staged();
|
ts = __total_staged();
|
||||||
|
}
|
||||||
mutex_unlock(stgd_lock);
|
mutex_unlock(stgd_lock);
|
||||||
if (ts > opt_queue)
|
if (ts > opt_queue)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user