R��mi Bernon (@rbernon) commented about dlls/windows.media.speech/recognizer.c:
+ TRACE("paused!\n"); + SetEvent(impl->session_paused_event); + WaitForSingleObject(impl->session_resume_event, INFINITE); + } + + Sleep(500); /* Sleep to slow down spinning for now. */ + } + + return 0; +} + +static HRESULT WINAPI shutdown_session_thread( ISpeechContinuousRecognitionSession *iface ) +{ + struct session *impl = impl_from_ISpeechContinuousRecognitionSession(iface); + + SetEvent(impl->session_resume_event); /* Set the resume even just in case the session was paused. */ You would not need to set anything here, as it would be done in `session_Stop` / `session_Release`. Maybe rename that helper to `join_session_thread`.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/729#note_7747