Merge pull request #2392 from c1728p9/fix_terminate_join

Fix joining a terminated thread
pull/2400/head
Martin Kojtal 2016-08-09 14:03:54 +01:00 committed by GitHub
commit 91ff73d545
1 changed files with 3 additions and 0 deletions

View File

@ -104,6 +104,9 @@ osStatus Thread::terminate() {
ret = osThreadTerminate(_tid);
_tid = (osThreadId)NULL;
// Wake threads joining the terminated thread
_join_sem.release();
_mutex.unlock();
return ret;
}