Browse Source

thread shutdown is different on windows

Kano 13 years ago
parent
commit
1bb2cadfa6
1 changed files with 5 additions and 0 deletions
  1. 5 0
      cgminer.c

+ 5 - 0
cgminer.c

@@ -2819,8 +2819,13 @@ static void __kill_work(void)
 		if (thr && PTH(thr) != 0L)
 		if (thr && PTH(thr) != 0L)
 			pth = &thr->pth;
 			pth = &thr->pth;
 		thr_info_cancel(thr);
 		thr_info_cancel(thr);
+#ifndef WIN32
 		if (pth && *pth)
 		if (pth && *pth)
 			pthread_join(*pth, NULL);
 			pthread_join(*pth, NULL);
+#else
+		if (pth && pth->p)
+			pthread_join(*pth, NULL);
+#endif
 	}
 	}
 
 
 	applog(LOG_DEBUG, "Killing off stage thread");
 	applog(LOG_DEBUG, "Killing off stage thread");