check_all
better error handling for pthreads