Fixed for pthreads mutexes with thread pool queue