Jinoh Kang (@iamahuman) commented about dlls/windows.media.speech/recognizer.c:
return E_NOTIMPL;
}
-static HRESULT WINAPI start_callback( IInspectable *invoker ) +static HRESULT session_start_async( IInspectable *invoker ) {
- return S_OK;
- struct session *impl = impl_from_ISpeechContinuousRecognitionSession((ISpeechContinuousRecognitionSession *)invoker);
- HRESULT hr = S_OK;
- EnterCriticalSection(&impl->cs);
- if (!(impl->worker_thread = CreateThread(NULL, 0, session_worker_thread_cb, impl, 0, NULL)))
You should check for `impl->worker_thread` and `impl->worker_running` here. Due to how thread pools work, any user code can be executed between `session_StartAsync` and `session_start_async`.