Michael,

I think you need to pass your filename and dStruct into the thread as
arguments... as in

<cfthread action="run" name="#threadID#" filename="#filename#"
dStruct="#dStruct#">
        <cfhttp url="#listGetAt(dStruct.images,pos)#"
path="#ExpandPath('./')#/parsed/" file="#fileName#" />
</cfthread>

Off the top of my head that's what I remember... that arguments need to be
passed in as attributes to get into the scope.

-Mark




-----Original Message-----
From: Michael Grant [mailto:mgr...@modus.bz] 
Sent: Wednesday, December 15, 2010 10:08 PM
To: cf-talk
Subject: CFThread - Am I using it correctly?

 
I have some older code that gets remote content. I wanted to add the use of
cfthread to allow the app to run other processes while it's pulling larger
files. However once I wrap it in thread tags it stops actually pulling the
files. It doesn't throw an error or act any differently except that they
code executes much faster since it doens't appear to actually be pulling
anything.

This works:
<cfhttp url="#listGetAt(dStruct.images,pos)#"
path="#ExpandPath('./')#/parsed/" file="#fileName#" />

This doesn't:

<cfthread action="run" name="#threadID#">
<cfhttp url="#listGetAt(dStruct.images,pos)#"
path="#ExpandPath('./')#/parsed/" file="#fileName#" />
</cfthread>

Am I missing something?




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340092
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to