I agree, Dave.  I only use named locks in CFMX, specific to the section of
code I'm locking.

-----Original Message-----
From: Dave Carabetta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 7:50 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] CFCs in memory


>On Monday, Jul 28, 2003, at 20:19 US/Pacific, Stephane 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).

----------------------------------------------------------
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).

Reply via email to