Whatever message this page gives is out now! Go check it out!
isThreadInterrupted(threadName)<cfscript>
testThreadName = "thread-interrupted"
thread action="run" name="#testThreadName#" {
count = 0;
while(!isThreadInterrupted(testThreadName)){
variables.message = count++;
writeOutput("thread #testThreadName# running.<br>");
}
writeOutput("Thread #testThreadName# interrupted. exiting.<br>");
}
sleep(2) //let the thread above startup.
writeOutput("isInterrupted:" & isThreadInterrupted(testThreadName) & "<br>") //expect: no
interruptThread(testThreadName);
writeOutput("after interrupt, isInterrupted:" & isThreadInterrupted(testThreadName) & "<br>") //expect: yes
</cfscript>