Samuel Thibault
e13b602ce0
Avoid using pthread_cancel
If a thread is cancelled while it holds a mutex, other threads waiting for
the mutex will never be woken, even if destroying the mutex, thus
leading to a deadlock.
Better just make the thread loops have a proper exit case than risking
the tricky semantic of pthread_cancel.