6 Jan
2023
6 Jan
'23
11:22 a.m.
Rémi Bernon (@rbernon) commented about dlls/windows.media.speech/recognizer.c:
static HRESULT session_pause_async( IInspectable *invoker ) { + struct session *impl = impl_from_ISpeechContinuousRecognitionSession((ISpeechContinuousRecognitionSession *)invoker); + + EnterCriticalSection(&impl->cs); + if (impl->worker_running) impl->worker_paused = TRUE; + LeaveCriticalSection(&impl->cs);
You don't *have* to, here, because the thread will eventually check it, but I think it's maybe better to notify the condition variable every time a flag that can be waited on is modified. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/729#note_20411