Lucee Function Reference

threadinterrupt()

Interrupts a specified thread by setting its interrupt status flag.
This function sets the interrupt status flag on a CFThread. The behavior depends on the thread's current state:
- If the thread is blocked in a ThreadJoin or sleep method call: its interrupt status will be cleared and it will
receive an InterruptedException
- If the thread is executing a long-running operation with interrupt checks: the operation may terminate early
- If the thread is not alive: the interrupt request may have no effect

Example

threadinterrupt([string name]):any

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Description
name string  No The name of the thread to interrupt. If omitted or empty, the current thread will be interrupted.