mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-09 04:31:47 +00:00
Never wait indefinitely for a pthread conditional in the hash_pop loop in case the work scheduler misses the last wakeup.
This commit is contained in:
parent
31df767cc7
commit
3f9ccc1b27
@ -5915,7 +5915,6 @@ static struct work *hash_pop(void)
|
||||
|
||||
mutex_lock(stgd_lock);
|
||||
while (!HASH_COUNT(staged_work)) {
|
||||
if (!no_work) {
|
||||
struct timespec then;
|
||||
struct timeval now;
|
||||
int rc;
|
||||
@ -5932,10 +5931,6 @@ static struct work *hash_pop(void)
|
||||
no_work = true;
|
||||
applog(LOG_WARNING, "Waiting for work to be available from pools.");
|
||||
}
|
||||
} else {
|
||||
pthread_cond_signal(&gws_cond);
|
||||
pthread_cond_wait(&getq->cond, stgd_lock);
|
||||
}
|
||||
}
|
||||
|
||||
if (no_work) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user