Merge pull request #1063 from metayan/fast-exit

Ensure fast exit
This commit is contained in:
Martin Ling
2022-03-17 12:07:54 +00:00
committed by GitHub

View File

@ -1786,6 +1786,12 @@ static int kill_transfer_thread(hackrf_device* device)
* Now call request_exit() to halt the main loop.
*/
request_exit(device);
/*
* Interrupt the event handling thread instead of
* waiting for timeout.
*/
libusb_interrupt_event_handler(g_libusb_context);
value = NULL;
result = pthread_join(device->transfer_thread, &value);
if( result != 0 )