A sample C++ Threading in pthreads and C++11 std::thread