Use pthreads in a consumer-producer problem.