The cfthread tag enables multithreaded programming in ColdFusion.
Threads are independent streams of execution, and multiple threads
on a page can execute simultaneously and asynchronously, letting you
perform asynchronous processing in CFML. CFML code within the cfthread
tag body executes on a separate thread while the page request thread
continues processing without waiting for the cfthread body to finish.
You use this tag to run or end a thread, temporarily stop thread execution,
or join together multiple threads.
<cfthread>
thread action="" name="";
join
run
sleep
terminate
HIGH
LOW
NORMAL
name
attribute is optional.
name
attribute is optional.
CF 9+
thread action="run" name="myThread" {
// do single thread stuff
}
thread action="join" name="myThread,myOtherThread";
<cfthread action="run" name="myThread">
<!--- Do single thread stuff --->
</cfthread>
<cfthread action="join" name="myThread,myOtherThread" />
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.