Every thread has an entry-point routine with one argument. The same entry-point routine may be used by several threads. See Creating Threads for more information about thread creation. Thread Termination Threads can terminate themselves by either returning from their entry-point routine or calling a library subroutine. Threads can also terminate other threads, using a mechanism called cancellation .
Any thread can request the cancellation of another thread.
Each thread controls whether it may be canceled or not. Cleanup handlers may also be registered to perform operations when a cancellation request is acted upon. See Terminating Threads for more information about thread termination. Synchronization Threads need to synchronize their activities to effectively interact. These are primitive but powerful mechanisms, which can be used to build more complex mechanisms.