On Monday, Jul 28, 2003, at 20:19 US/Pacific, St�phane Bisson wrote:Thanks to make me understand... but I'm just questionning on one thing... Let's take this example...
I have this in my Application.cfm
<cfif NOT IsDefined("Application.MailService")> <cflock scope="Application" Timeout="10" THROWONTIMEOUT="No" Type="Exclusive"> <cfif NOT IsDefined("Application.MailService")> <cfobject component="#request.componentpath#MailService" name="Application.MailService"> </cfif> </cflock> </cfif>
Looks good.
Wouldn't it be better to use a named lock in this instance instead of locking the entire Application scope? Why exclusively lock the entire scope to set one variable? Seems like an unnecessary bottleneck to me, especially if it takes a while to instantiate that component. That is unless, of course, I'm missing something.
Regards, Dave.
_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
