Using the stack. And pthread_join with NULL.