I was implementing the producer consumer problem using a thread pool. I am using a mutex on the job_queue and a conditional variable to check if the queue has data. I am try