Instead of going the route of using cfthread, I would suggest that you might looking into using a queue to handle this. There are a lot of queue options out there ( I believe that Railo uses ActiveMQ for a bunch of things internally, don't know about Adobe) but the essential idea is that you push a message onto the queue at the end of your request (onRequestEnd) and then you have an asynchronous worker process that monitors the queue, pulls messages off as they show up and then processes them. If you start seeing a big spike in traffic and need to pull the messages off the queue more quickly, you can increase the number of workers. If time isn't a particularly big issue, you can just let the one worker go and the messages will all be dealt with eventually.
Cheers, Judah On Tue, May 17, 2011 at 7:56 AM, Brook Davies <[email protected]> wrote: > > Hi Guys, > > > > I am considering spawning a new thread via the onRequestEnd event to do some > post processing. Basically its going to record some stats (a couple quick DB > queries) and possibly send an email based on some criteria. I am considering > CFTHREAD because the user does not need to wait for any results of this > processing. > > > > I've read some things about CFTHREAD being a bottle neck and that CF > Proffesional has limited threads. Would I be asking for trouble trying to do > this? Should I just let the user wait for the processing to finish? It would > really like only be 100-200 milliseconds or so > > > > Brook > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:344618 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

