Types of requestInterrupt() Functions
The Threading package has two types of requestInterrupt() functions:
*One waits indefinitely for the runnable to either interrupt or exit.
*One accepts a time-limit for the wait.
The requestInterrupt() functions return one of the following:
*RW_THR_ABORTED if the runnable was not active or exited during the request.
*RW_THR_ACQUIRED if the runnable was successfully interrupted.
*RW_THR_TIMEOUT if the request was time-limited and the runnable failed to interrupt within the allotted time.
Several functions in the Threading package accept a timeout value. This value is meant to specify the amount of “wall-clock” time, in milliseconds, that a function waits before timing out.
NOTE: In some situations, functions that accept a timeout value actually measure duration by the amount of CPU time used, not by the elapsed wall-clock time.
This may result in longer timeout periods than are expected or intended. In these situations, the amount of delay is directly proportional to the percentage of available CPU time granted to the process.