mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-08 04:02:08 +00:00
Only display the no pool work message once if there are multiple waiters in hash_pop
This commit is contained in:
parent
20de9226fd
commit
77f9400ca2
@ -5495,7 +5495,10 @@ static struct work *hash_pop(void)
|
|||||||
then.tv_sec = now.tv_sec + 5;
|
then.tv_sec = now.tv_sec + 5;
|
||||||
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);
|
||||||
if (rc) {
|
/* Check again for !no_work as multiple threads may be
|
||||||
|
* waiting on this condition and another may set the
|
||||||
|
* bool separately. */
|
||||||
|
if (rc && !no_work) {
|
||||||
applog(LOG_WARNING, "Waiting for work to be available from pools.");
|
applog(LOG_WARNING, "Waiting for work to be available from pools.");
|
||||||
no_work = true;
|
no_work = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user