previous | start | next

Termination

Individual threads can terminate without terminating all the other threads in the process by calling:

      pthread_exit((void *) value);
   

or (except for main) by a return statement

      return((void *) value);
   

Note: If main() terminates by the return statement:

      return value;
   

This implicitly calls exit(value), not pthread_exit(value).

Calling exit(..) instead of pthread_exit will as usual terminate the process and consequently all its threads.



previous | start | next