You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix deadlock when calling fflush during application shutdown
One solution to the deadlock described in #15186 is to allow nested
calls to `emscripten_current_thread_process_queued_calls`.
This is needed in this case because the main thread is calling `fflush`
(which requires locking the stdout handle) while another thread is
holding the stdout lock, waiting on the main thread to process the write
action.
There may be reasons we don't want to allow nested calls to
`emscripten_current_thread_process_queued_calls` but technically its
seems possible.
This change removes all the mitigations that existed in
`test_pthread_c11_threads.c` and I could no longer reprodude the
deadlock.
Fixes: #15186
0 commit comments