Jinoh Kang (@iamahuman) commented about dlls/windows.media.speech/recognizer.c:
if (!ref) {
HANDLE thread;EnterCriticalSection(&impl->cs);thread = impl->worker_thread;impl->worker_running = FALSE;impl->worker_thread = INVALID_HANDLE_VALUE;LeaveCriticalSection(&impl->cs);SetEvent(impl->worker_control_event);session_join_worker_thread(thread);
```suggestion:-0+0 WaitForSingleObject(thread, INFINITE); CloseHandle(thread); ```
Readers cannot infer that `session_join_worker_thread` closes the given handle from the function's name. Instead of renaming it to `session_join_close_worker_thread`, might as well open code it.