Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task: Fix deadlock between thread and iio_task_stop()
It is possible that iio_task_stop() will be called even before the iio_task_run() thread enters the while() loop, where it waits for tasks; in that case, both threads would be waiting on the condition variable without anyone signaling it. Address that issue by signaling the condition variable at the beginning of the for() loop, and not at the end. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
- Loading branch information