C++ Thread class sample.