Rémi Bernon (@rbernon) commented about dlls/windows.devices.enumeration/main.c:
+ EnterCriticalSection( &impl->cs ); + switch (impl->status) + { + case DeviceWatcherStatus_Created: + case DeviceWatcherStatus_Stopped: + case DeviceWatcherStatus_Aborted: + { + struct device_watcher_weak *weak; + + if (!(weak = device_watcher_make_weak( impl ))) + { + LeaveCriticalSection( &impl->cs ); + return E_OUTOFMEMORY; + } + impl->status = DeviceWatcherStatus_Started; + if (!TrySubmitThreadpoolCallback( device_watcher_enumerate_proc, weak, NULL )) How about using an async here instead of using thread pool directly?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7997#note_102977