1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-03 02:24:35 +00:00

Stop the mining threads before trying to kill them.

This commit is contained in:
Con Kolivas 2012-02-17 23:10:01 +11:00
parent 1c211c5f41
commit 61328a4292

View File

@ -1702,8 +1702,17 @@ void kill_work(void)
thr = &thr_info[watchdog_thr_id];
thr_info_cancel(thr);
applog(LOG_DEBUG, "Killing off mining threads");
applog(LOG_DEBUG, "Stopping mining threads");
/* Stop the mining threads*/
for (i = 0; i < mining_threads; i++) {
thr = &thr_info[i];
thr->pause = true;
}
sleep(1);
applog(LOG_DEBUG, "Killing off mining threads");
/* Kill the mining threads*/
for (i = 0; i < mining_threads; i++) {
thr = &thr_info[i];
thr_info_cancel(thr);