Rémi Bernon (@rbernon) commented about dlls/windows.media.speech/recognizer.c:
- return async_action_create(NULL, session_stop_async, action);
- struct session *impl = impl_from_ISpeechContinuousRecognitionSession(iface);
- BOOLEAN running;
- HRESULT hr;
- TRACE("iface %p, action %p.\n", iface, action);
- *action = NULL;
- EnterCriticalSection(&impl->cs);
- if ((running = impl->worker_running))
- {
impl->worker_running = FALSE;
- }
- LeaveCriticalSection(&impl->cs);
You'll probably need to signal the condition variable here, for instance to wake up the if the thread if it was paused.