RE: CFThread - Am I using it correctly?
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
RE: CFThread - Am I using it correctly?
Michael, You might also need to pass in pos - or of course you could simply pass in the URL and full file path and simplify the stuff you are passing back and forth.. Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Mark A. Kruger [mailto:mkru...@cfwebtools.com] Sent: Thursday, December 16, 2010 6:38 AM To: cf-talk Subject: RE: CFThread - Am I using it correctly? 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:340093 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread - Am I using it correctly?
AH! Thanks Mark. I'll try that as soon as I can. It might be a couple of days before i can get back to it but I'm really excited to get this to work. I know I'm a little behind the times but better late than never I guess. On Thu, Dec 16, 2010 at 7:38 AM, Mark A. Kruger mkru...@cfwebtools.comwrote: 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:340094 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread - Am I using it correctly?
Mark, Thanks so much. This worked a treat. I also jacked up the cfthread limit in the admin and now the app is literally buzzing along. On Thu, Dec 16, 2010 at 7:47 AM, Mark A. Kruger mkru...@cfwebtools.comwrote: Michael, You might also need to pass in pos - or of course you could simply pass in the URL and full file path and simplify the stuff you are passing back and forth.. Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Mark A. Kruger [mailto:mkru...@cfwebtools.com] Sent: Thursday, December 16, 2010 6:38 AM To: cf-talk Subject: RE: CFThread - Am I using it correctly? 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:340100 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread - Am I using it correctly?
I should mention this code is inside a cfc with a remote access type that I'm calling from a .cfm in the same directory. Don't know if any of that matters. On Wed, Dec 15, 2010 at 11:08 PM, Michael Grant mgr...@modus.bz wrote: 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:340091 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm