Just glancing at this code snippet... I haven't done any work with
cfthread recently, but I have implemented it in the past... I wouldn't
expect the var keyword at the top to work. The thread does its own
encapsulation that's more similar to a custom tag, so I would expect the
var keyword to produce an error. I believe that's a parser error, which
happens before compiling the template, so the template with the cfthread
in it shouldn't even run. But then I've never tested this either. 

Also I wouldn't lock that catch - it doesn't need a lock around it as
far as I can tell and if it did, then I suspect the lock would need to
be outside the try tags, because putting it inside the catch will mean
you still have a race condition. But I don't think a race condition
exists there in the first place because of the cfthread tag's
encapsulation. You also shouldn't need to duplicate the cfcatch. I don't
think it'll hurt anything, but it shouldn't be necessary. 

hth,
ike

>     <cfthread name="batchRenew_thread#i#" threadIndex="#i#" 
> threadPathDate="#pathDate#" action="run">
>     <cfset var vRenewalReport = "">
> 
>     <cftry>
>         <cfoutput>#threadIndex#: #threadPathDate#</cfoutput>
>        
>         <cfset thread.foobar = threadIndex & ": " & threadPathDate>
>    
>         <cfcatch type="any">
>             <cflock name="treadLogLock" timeout="5" type="exclusive">
>                     <cfset thread.cfcatch = duplicate(cfcatch)>
>             </cflock>
>         </cfcatch>
>     </cftry>
>     </cfthread>
> 

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
     ph: 781.769.0723

http://onTap.riaforge.org/blog



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:308804
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