The pthread_cancel() function requests that target_thread be canceled.
By default, cancellation is deferred until target_thread reaches a cancellation point. See cancellation(3THR).
Cancellation cleanup handlers for target_thread are called when the cancellation is acted on. Upon return of the last cancellation cleanup handler, the thread-specific data
destructor functions are called for target_thread. target_thread is terminated when the last destructor function returns.
The cancellation processing in target_thread runs asynchronously with respect to the calling thread returning from pthread_cancel().
|