avoid deadlock

This commit is contained in:
condret 2024-01-05 21:25:29 +01:00 committed by pancake
parent 451d1a01f0
commit 87c57fb53b
1 changed files with 3 additions and 1 deletions

View File

@ -282,14 +282,16 @@ R_API bool r_th_start(RThread *th, int enable) {
while (!th->ready) {
/* spinlock */
}
r_th_lock_leave (th->lock);
//r_th_lock_leave (th->lock);
}
#if 0
} else {
if (r_th_is_running (th)) {
// stop thread
//r_th_kill (th, 0);
r_th_lock_enter (th->lock); // deadlock?
}
#endif
}
r_th_set_running (th, enable);
return ret;