canceled threads instead of joining since pthread_cond_timedwait doesn't work