Making A Thread Join-able (Cont.) /* create the thread. */ thr_id = pthread_create(&thread, &thr_attr, thread_func, (void*)NULL); /* finally, we may destroy the attribute object. */ if (pthread_attr_destroy(&attr) != 0) { /* handle error... */ }