14 Jan
2023
14 Jan
'23
2:07 a.m.
The problem I see here is that a new worker could be spawned prematurely when I set`session->worker_thread = NULL;` before waiting on the thread. This could then cause races.
Yes, you should use an invalid sentinel value or flip the LSB of the handle (`(HANDLE)((ULONG_PTR)handle | 1)`) instead. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/729#note_20994