зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1267930 - When the wasapi rendering loop is stuck and we're shuttin down, leak the thread and continue the shutdown process. r=kinetik
It's probably better to not TerminateThread here, because we don't really know what happened down the stack of the rendering loop, so we just leak it. This happens during shutdown so it's not really an issue, it's going to be cleaned up by the OS anyways. MozReview-Commit-ID: 4o3Krj7L7m2
This commit is contained in:
Родитель
fdbd0a8be3
Коммит
3b6d6ce4d6
|
@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
|
|||
|
||||
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
|
||||
|
||||
The git commit ID used was 05abb60b99a46d1d21abe58d9e5f3bdb4f0df4a8.
|
||||
The git commit ID used was 6194d5f4af9722e97084b5292a9f62a7f737a726.
|
||||
|
|
|
@ -1160,7 +1160,15 @@ void stop_and_join_render_thread(cubeb_stream * stm)
|
|||
LOG("Destroy SetEvent failed: %d\n", GetLastError());
|
||||
}
|
||||
|
||||
DWORD r = WaitForSingleObject(stm->thread, INFINITE);
|
||||
/* Wait five seconds for the rendering thread to return. It's supposed to
|
||||
* check its event loop very often, five seconds is rather conservative. */
|
||||
DWORD r = WaitForSingleObject(stm->thread, 5000);
|
||||
if (r == WAIT_TIMEOUT) {
|
||||
/* Something weird happened, leak the thread and continue the shutdown
|
||||
* process. */
|
||||
LOG("Destroy WaitForSingleObject on thread timed out,"
|
||||
" leaking the thread: %d\n", GetLastError());
|
||||
}
|
||||
if (r == WAIT_FAILED) {
|
||||
LOG("Destroy WaitForSingleObject on thread failed: %d\n", GetLastError());
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче