What are the different ways in which a thread can be cancelled?
Cancellation of a target thread may occur in two different scenarios:
1 Asynchronous cancellation: One thread immediately terminates the target thread is called asynchronous cancellation.
2 Deferred cancellation: The target thread can periodically check if it should terminate, allowing the target thread an opportunity to terminate itself in an orderly fashion.
1 Asynchronous cancellation: One thread immediately terminates the target thread is called asynchronous cancellation.
2 Deferred cancellation: The target thread can periodically check if it should terminate, allowing the target thread an opportunity to terminate itself in an orderly fashion.
Leave a Comment