# Basic Thread Management

- ## Detaching a Thread - pthread_detach()

  - int pthread_detach(pthread_t tid)
  - may NOT be joined after detachment
  - exit status is lost

- ## Terminating a thread - pthread_exit()

  - pthread_exit( void *value_ptr)
  - Analogous to process exit()
  - Implicitly called when start_routine terminates.
  - Last thread in process implicitly calls exit(0)

Previous slide | Next slide | Back to first slide | View graphic version