SourcePro Core
:
Threads Module User's Guide
:
PART II Concurrency Packages
:
The Threading Package
:
The Runnable Object Classes
:
Canceling a Runnable
: Canceling a Runnable from Another Thread
Canceling a Runnable from Another Thread
To cancel a runnable from another thread, you need to call the
RWRunnable
function,
requestCancellation()
. This function sets a flag maintained within the runnable instance, and waits for the runnable to complete cancellation.
This site works best with JavaScript enabled