But shouldn't this whole issue be written into the server code?
Wouldn't it would run much faster that way than both the individual sets
of cflocks that you've portrayed and the reality which is sets of locks
around blocks of session accesses? As far as readonly or exclusive goes,
then shouldn't the complier be able to distinguish the two?

And as long as we're here, show me a single time when you don't want to
use locks around a session scope.

- Matt Small

-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 18, 2002 3:26 PM
To: CF-Talk
Subject: RE: UDF question

(Taking off Macromedia cap and speaking as just one of yall...)
The question is - do you want CF to automatically handle everything for
you at the sacrifice of speed? Here is a good example:

<cfset session.x = 1>
<cfset session.y = 2>
<cfloop ...>
        <cfset session["foo#x#" = >
</cfloop>

If CF had to auto lock this, it would need to use:

<cflock ..>
        <cfset session.x = 1>
</cflock>
<cflock ..>
        <cfset session.y = 2>
</cflock>
<cfloop ...>
        <cflock ...>
                ...
        </cflock>
</cfloop>

It would be very difficult to make a system smart enough to know "Hey, I
could use one lock around this particular block of code." Therefore, we
would be stuck with the slower alternative. Personally, I'd rather just
do the work. It can't be that hard to cflock, or duplicate to the
request scope.

..... again, all of the above is my personal opinion, not that of the
company.....  


=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

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

> -----Original Message-----
> From: junkMail [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, March 18, 2002 3:18 PM
> To: CF-Talk
> Subject: Re: UDF question
> 
> 
> With respect to this issue, comparing CFML to C++ is apples 
> to oranges.
> 
> I can't expect a low-level language to automatically manage 
> concurrent access
> to shared memory resources, because I have defined the 
> resources and I have
> decided how they are to be accessed and shared.   I can't 
> expect a such system
> to be prescient.
> 


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to