> On Thursday, May 29, 2003, at 14:46 US/Pacific, Raymond Camden wrote:
> >> 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.
>
> The line in question is (something like):
>
> application.thing = createObject("component","foobar");
>
> Depending on how the component is written, it may not be safe to
> execute it twice at the same time. If the constructor automatically
> runs all of the file loading and parsing and whatever else, then just
> constructing the component more than once at the same time
> *may* create
> race conditions. Like I say, it all depends on how it was written. I
> was advising a solution that *guarantees* you don't get a race
> condition, no matter how the component is written.
>
Good point. What about the CFC itself handling any locking? Would it
make more sense in there then 'on the outside'? My gut feelings say the
CFC should do all the work for me.
-rc
----------------------------------------------------------
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).