cv.notify_all();

Needs a notify or some poor thread will be waiting for eternity for more data.