Old C++ wrapper for pthreads.