libusbmuxd icon indicating copy to clipboard operation
libusbmuxd copied to clipboard

usbmuxd_events_unsubscribe is blocked about 2~3 secs

Open yanqinglu opened this issue 4 years ago • 1 comments

If users don't install iTunes, the usbmuxd_events_unsubscribe will be blocked about 2~3 secs. usbmuxd_events_unsubscribe calls thread_join to wait the thread to be finished, but the sleep in usbmuxd_listen_poll delay it. Should not use the sleep function, it's better to use a event to wait for timeout, then set the event in usbmuxd_events_unsubscribe .

yanqinglu avatar Dec 24 '21 03:12 yanqinglu

By the way, the select calling in socket_connect also blocks the usbmuxd_events_unsubscribe

yanqinglu avatar Dec 24 '21 04:12 yanqinglu