pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
pthread_create(&state_->thread_, &attr, crstart, this->state_);
pthread_attr_destroy(&attr);

Example 3: The final three statements of the constructor.

Back to Article