> On Thursday, May 29, 2003, at 14:26 US/Pacific, Raymond Camden wrote:
> > So in this case, the lock is for performance reasons?
> 
> No. It's to prevent the initialization from being run twice. That is 
> not necessarily a performance issue.

But why is this bad? Yes it's a waste of time to run <cfset
application.dsn = "foo"> more than once, but it's not the same as
running it on every request. Worst-case scenario is that it's run a few
times if and only if people hit the site in droves right when it opens.

> > Does that still qualify as a race condition?
> 
> Depending on exactly how the initialization is coded, it may not be 
> safe to run the initialization more than once concurrently - 
> therefore, 
> yes, you have a potential race condition.

Defintely agree about a potential race condition - but it was my
understanding that data issues didn't apply here - ie - all the values
were static.

========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

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