usb-device-manager: Last chance to avoid deadlock handling libusb events

Attempt to better interrupt event handling loop.
If the thread handling events is stuck waiting events or handling an
event try to interrupt before joining the thread.

For Unix code in spice_usb_device_manager_dispose will try to force
some thread exit but this is not done for Windows so calling
libusb_interrupt_event_handler will help.  Code is not in a hot path
so won't change the execution time.

Signed-off-by: Frediano Ziglio <>
Acked-by: Victor Toso <>
2 jobs for master in 5 minutes and 41 seconds (queued for 1 minute and 7 seconds)
Status Job ID Name Coverage
passed #414370


passed #414371