Threads Cancellations

int pthread_cancel(pthread_t thread);

sends a cancellation request to the thread thread.

int pthread_setcancelstate(int state, int *oldstate);

sets the cancellation state of the thread via state to PTHREAD_CANCEL_ENABLE or PTHREAD_CANCEL_DISABLE

int pthread_setcanceltype(int type, int *oldtype);

sets the cancellation type of the thread via type to PTHREAD_CANCEL_DEFERRED or PTHREAD_CANCEL_ASYNCHRONOUS

Last updated

Was this helpful?