Check return values of pthread_* calls with BOOST_VERIFY, per #8898