Are you updating application.ws via the ws variable? It was my understanding that read locks are no longer required so if you're just reading data or executing code, you could use application.ws directly in the page.

Pretty sure ws in the code you proved below is simply a pointer to the application.ws variable.

Aaron
Sleeping makes me a better developer :)

Marc wrote:
Brain farting here, making sure I'm thinking about this the right way:

1.  I cflock a block of code that stores ws.cfc in application scope
(singleton). The lock is exclusive.

2.  For each page request, I read-only cflock a small block of code to cfset
ws = application.ws -- locking this small block of code is good for
performance instead of having to lock everywhere I need to use this
component.  (is ws a complete copy of application.ws, or is it just a
reference to it?)

3.  I can then reference "ws" for the remainder of my page call without
locking, instead of using application.ws and having to cflock everywhere.

Is this correct, or have I totally forgotten my locking rules for CF 6.1?

Man, I'm just burned out...

m


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to