Whatever message this page gives is out now! Go check it out!
<cfloop index="pageIndex" from="1" to="5">
<cfthread name="thr#pageIndex#" threadIndex="#pageIndex#" action="run">
<cfset Variables.theOutput[threadIndex]="Thread index attribute:" &
threadIndex & " Page index value: " & pageIndex>
</cfthread>
</cfloop>
<cfthread action="join" name="thr1,thr2,thr3,thr4,thr5" timeout=2000/>
<cfloop index="j" from="1" to="5">
<cfoutput>#theOutput[j]# <br /></cfoutput>
</cfloop>Value | Meaning |
NOT_STARTED | The thread has been queued but is not processing yet. |
RUNNNG | The thread is running normally. |
TERMINATED | The thread stopped running as a result of one of the following actions:
|
COMPLETED | The thread ended normally. |
WAITING | The thread has run a cfthread tag with action="join", and one or more of the threads being joined have not yet completed. |
<cftransaction>
<cfthread name ="t1" ...>
<cfquery name="q1" ...>
...
</cfquery>
</cfthread>
<cfquery name="q2" ...>
...
</cfquery>
<cfthread action="join" name="t1" ... />
</cftransaction><cfthread name ="t1" ...>
<cftransaction>
<cfquery name="q1" ...>
...
</cfquery>
<cfquery name="q2" ...>
...
</cfquery>
</cftransaction>
</cfthread>
<cfthread action="join" name="t1" ... />