<cftimeout>
Whilst similar to a <cfthread>, code run inside the <cftimeout> executes within the same scope as the current page
This tag may have a body.
This tag is also supported within <cfscript>
Introduced: 6.0.0.192
<cftimeout
timespan=object
ontimeout=any
onerror=any
forcestop=boolean
><!--- body --->[</cftimeout>]
Examples
// timeout after 2sec
cftimeout( timespan=createTimeSpan(0, 0, 0, 2)){
cfloop(times = "10"){
cftimer(label = "Nap time" type = "outline") {
echo("This case take run based upon time.");
cfflush();
sleep(400);
}
}
};
See also
- Threads
- <cfthread>
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)