deps-libff: Abort timer thread instead of cancelling

This commit is contained in:
John Bradley 2015-03-12 15:16:55 -05:00
parent 7a4a5e3fad
commit 47783f26c7

View File

@ -99,7 +99,11 @@ void ff_timer_free(struct ff_timer *timer)
assert(timer != NULL);
pthread_cancel(timer->timer_thread);
pthread_mutex_lock(&timer->mutex);
timer->abort = true;
pthread_cond_signal(&timer->cond);
pthread_mutex_unlock(&timer->mutex);
pthread_join(timer->timer_thread, &thread_result);
pthread_mutex_destroy(&timer->mutex);