Jan. 13, 2023
8:07 p.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