lib: fix hang on exit
As the sample worker thread might still be waiting for a buffer, we need to wake it up first before trying to join.
This commit is contained in:
parent
44b6e3b929
commit
b11fc430f3
|
@ -794,6 +794,9 @@ static void *fl2k_usb_worker(void *arg)
|
|||
}
|
||||
}
|
||||
|
||||
/* wake up sample worker */
|
||||
pthread_cond_signal(&dev->buf_cond);
|
||||
|
||||
/* wait for sample worker thread to finish before freeing buffers */
|
||||
pthread_join(dev->sample_worker_thread, NULL);
|
||||
_fl2k_free_async_buffers(dev);
|
||||
|
|
Loading…
Reference in New Issue