byannoni / qthreads

A POSIX thread wrapper using a pool and queues of functions for C and (soon) C++
Apache License 2.0
1 stars 1 forks source link

Fix deadlock in fq_pop() and fq_peek() #56

Closed byannoni closed 9 years ago

byannoni commented 9 years ago

This was caused by a deadlock in fq_pop(). The lock is reacquired during cancelation and was not released, deadlocking the other threads (this explains why thread 2 often exited without the others). A cleanup handler was added to fix this situation.

Fix #52