Implemented condition variables in visual studio.