C++ blocking queue