Check error code for thread create.  Detach pthreads so they get recycled