Pthreads that does not crash