Hello, all,
I'm trying to learn how to use CFTHREAD - just playing around with it, a bit - and I'm clearly missing something in the documentation.
As a "for example", I'm trying to use CFTHREAD to get the content of different web sites and output them from within a loop. Obviously this should be done asynchronously, as each page will have a different load time. But the output (even when using view source) remains blank. Timing, maybe?
<cfsilent> <cfset urlList = ListToArray("http://www.ustranscom.mil/,https://news.google.com/,http://www.sddc.mil/,https://news.yahoo.com/,http://www.amc.mil/,https://forums.adobe.com/") /> <cfset steList = ListToArray("USTRANSCOM,Google,SDDC,Yahoo!,AMC,Adobe") /></cfsilent>
I've tried:
<cfloop from="1" to="#ArrayLen(urlList)#" index="idx"><cfset steList[idx] = lcase(REreplace(steList[idx],"[^\w]","","all")) /><cfthread name="output#idx#" action="run" aURL="#urlList[idx]#"> <cfhttp url="#arguments.aURL#"></cfhttp></cfthread>Output: <cfdump var="output#idx#" /></cfloop>
.. and I've tried:
<cfloop from="1" to="#ArrayLen(urlList)#" index="idx"><cfset steList[idx] = lcase(REreplace(steList[idx],"[^\w]","","all")) /><cfthread name="output#idx#" action="run" aURL="#urlList[idx]#"> <cfhttp url="#arguments.aURL#"></cfhttp>Output: <cfdump var="#cfhttp#" /></cfthread></cfloop>
Nothing. So, I'm assuming it's something totally simple and I'm just not seeing it. Can anyone help me to understand how CFTHREADS are used?
V/r,
^_^