On Sat Jan 14 02:07:53 2023 +0000, Jinoh Kang wrote:
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.
I used `INVALID_HANDLE_VALUE` for now.