Added the use of a conditional variable to ThreadTest.cpp