I checked into using a "join" thread and at first glance it seemed
perfect.  But from the description in the docs, it seems to work
the opposite of what I'd hoped.  From the docs:

"The following code, for example, joins three threads to the current thread
(often, the main thread).  The current thread waits up to six seconds for the
other threads to complete, and continues processing if one or more threads do 
not complete by then."

<cfthread action="join" name="t1, t2, t3" timeout="6000"/>

--------------------------------

>From the description, it sounds like a "join" action causes threads that join
a running thread to wait until the "joining" threads are complete before it
finishes.

I must admit, it's a little confusing.  I thought it would work as you 
described,
that the joining threads would wait until the thread they were joining was 
finished
before processing.  But the description makes it sound the other way around. 

???

Rick

> -----Original Message-----
> From: joey krabacher [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 29, 2008 2:02 PM
> To: CF-Talk
> Subject: Re: cfthread running condition?
> 
> You might be able to kick of the first thread (set the action to run) then 
> have a list or
something that
> you can loop over and have a "join" cfthread inside the loop with the same 
> name as the first one.
> Something like this.
> 
> <cfthread action='run' name='t1'>
>  do something
> </cfthread>
> <cfloop index='i' from='1' to='50'>
>     <cfthread action='join' name='t1'>
>         do something
>     </cfthread>
> </cfloop>
> 
> I have not tried this, but the 'join' action tells cf to wait for the named 
> thread(t1) to finish.
> 
> Joey
> 
> >Is there a way to make the start of one thread
> >conditional upon the ending of a previous thread?
> >
> >I want to keep only one thread at a time running
> >and would like to set up a series of threads to run,
> >but only one at a time.
> >
> >I've been doing this with scheduled tasks and emailing
> >completion to myself for verification of success each morning,
> >but running 54 schedule task templates currently, with having to add
> >another 30 or so soon has just become quite cumbersome.
> >
> >Didn't know if there were any options.
> >
> >Too bad we can't number the threads to run sequentially
> >and set them to run only individually.
> >
> >Rick
> 
> 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311805
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to