`
Threading Issues
Thread Cancellation
Terminating a thread before to its conclusion is referred to as thread
cancellation. The other threads might be cancelled, for instance, if
several threads are simultaneously searching a database and one
thread gives the result. Another scenario is when a user stops a web
page from loading further by pressing a button on their web browser.
Each image is loaded in a different thread when a web page loads,
which happens frequently. All threads that are loading the page are
stopped when a user clicks the stop button on their browser.
The term "target thread" is frequently used to describe a thread that
has to be cancelled.
A target thread may be cancelled in one of two circumstances:
1. Asynchronous cancellation. The target thread is promptly
terminated by one thread.
2. Delayed revocation. The target thread has the ability to end itself
gracefully by regularly determining whether it should be
terminated.
When resources have been allocated to a thread that has been
cancelled or when a thread is terminated while it is updating shared
Threading Issues
Thread Cancellation
Terminating a thread before to its conclusion is referred to as thread
cancellation. The other threads might be cancelled, for instance, if
several threads are simultaneously searching a database and one
thread gives the result. Another scenario is when a user stops a web
page from loading further by pressing a button on their web browser.
Each image is loaded in a different thread when a web page loads,
which happens frequently. All threads that are loading the page are
stopped when a user clicks the stop button on their browser.
The term "target thread" is frequently used to describe a thread that
has to be cancelled.
A target thread may be cancelled in one of two circumstances:
1. Asynchronous cancellation. The target thread is promptly
terminated by one thread.
2. Delayed revocation. The target thread has the ability to end itself
gracefully by regularly determining whether it should be
terminated.
When resources have been allocated to a thread that has been
cancelled or when a thread is terminated while it is updating shared