you must use boost::thread instead of pthreads