Cleaner fast exit
Interrupt the event handling thread instead of waiting for timeout.
This commit is contained in:
@ -1787,11 +1787,10 @@ static int kill_transfer_thread(hackrf_device* device)
|
|||||||
*/
|
*/
|
||||||
request_exit(device);
|
request_exit(device);
|
||||||
/*
|
/*
|
||||||
* Make a final request, so that threadproc can exit immediately,
|
* Interrupt the event handling thread instead of
|
||||||
* without waiting for timeout. Don't care about result.
|
* waiting for timeout.
|
||||||
*/
|
*/
|
||||||
uint8_t board_id;
|
libusb_interrupt_event_handler(g_libusb_context);
|
||||||
result = hackrf_board_id_read(device, &board_id);
|
|
||||||
|
|
||||||
value = NULL;
|
value = NULL;
|
||||||
result = pthread_join(device->transfer_thread, &value);
|
result = pthread_join(device->transfer_thread, &value);
|
||||||
|
Reference in New Issue
Block a user