This is what I think I was trying to get at. Moving the loop into the
thread instead of having the loop outside the thread is the part I
think I was missing. Having a generic tool to do queue management
could be quite handy.

Of course I've since realized that my particular situation is slightly
more complicated (isn't that always how it goes?) but this is an
excellent place to start. Thanks Mark.

Judah

On Mon, Oct 27, 2008 at 6:02 PM, Mark Mandel <[EMAIL PROTECTED]> wrote:
> You really need 5 threads that loop, while there is something to be
> executed, and a Queue of CFCs that have a common execute() commands.
>
> something like:
>
> <cfthread name="thread1">
>
>   while(NOT queue.isEmpty())
>   {
>      action = queue.pop();
>      action.execute();
>   }
>
> </cfthread>
>
> While there is probably some error checking, and logging etc, that is
> the basic gist of building a queue processing system.
>
> Mark
>
> On Tue, Oct 28, 2008 at 10:39 AM, Alan Rother <[EMAIL PROTECTED]> wrote:
>> Yeah... I kind of figured that was the deal, but I had to point it out.
>> In that case Dave is right (as he almost always is...) keeping a single
>> monitoring thread active to watch the others makes the most sense.
>>
>> One thing to watch our for in fully asynchronous threads is that error
>> catching is much tricker. Many of the usual techniques don't work. I had to
>> build a complex system that during development failed all the time, yet
>> never logged a single error in the CF log files. The only solution I could
>> come up with during dev was to wrap every segment of code in a cftry that
>> used a webservice to report errors back to me through lighthouse.
>>
>> =]
>>
>> --
>> Alan Rother
>> Adobe Certified Advanced ColdFusion MX 7 Developer
>> Manager, Phoenix Cold Fusion User Group, AZCFUG.org
>>
>>
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314435
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to