mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-08 21:14:14 +00:00
Only pthread_join when pthread_cancel does not return an error.
This commit is contained in:
parent
13c40f753b
commit
59293a37d6
2
util.c
2
util.c
@ -681,7 +681,7 @@ void thr_info_cancel(struct thr_info *thr)
|
|||||||
if (thr->q)
|
if (thr->q)
|
||||||
tq_freeze(thr->q);
|
tq_freeze(thr->q);
|
||||||
if (thr->pth) {
|
if (thr->pth) {
|
||||||
if (pthread_cancel(thr->pth))
|
if (!pthread_cancel(thr->pth))
|
||||||
pthread_join(thr->pth, NULL);
|
pthread_join(thr->pth, NULL);
|
||||||
thr->pth = 0L;
|
thr->pth = 0L;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user