Using c++11 threads, mutexes, and condition variables