just use pthread_join