Use std::thread for tests if we can, boost::thread if we must.