3 Jan
2023
3 Jan
'23
3:45 p.m.
On Tue Sep 6 05:38:41 2022 +0000, Rémi Bernon wrote:
I believe a more canonical way to write this thread would be something like: ```c++ EnterCriticalSection(&impl->cs); while (impl->session_running) { if (impl->session_paused) { SleepConditionVariableCS(&impl->cv, &impl->cs, INFINITE); continue; } /* TODO: Send mic data to recognizer. */ Sleep(500); /* Sleep to slow down spinning for now. */ } LeaveCriticalSection(&impl->cs); ``` I think this would block making changes to the session_running variable as long as the session is running, which isn't wanted.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/729#note_20270