Types of requestCancellation Functions
Threads Module has two types of requestCancellation() functions:
One waits indefinitely for the runnable to either cancel or exit.
One accepts a time-limit for the wait.
The requestCancellation() function returns one of the following:
RW_THR_COMPLETED if the runnable was successfully canceled, exited, or was not active in the first place.
RW_THR_ABORTED if the cancellation process was started, but the
RWCancellation exception object was not allowed to propagate back to the runnable class.
RW_THR_TIMEOUT if the request was time-limited and the runnable failed to complete cancellation within the allotted time.
Once a canceled runnable begins the cancellation process, it continues that process even if the original request for cancellation times out.