Automatic Read Locking in CF5

2002-05-14 Thread David Schmidt

So that I am straight, and sure there are no bugs that will mess me up...

Is it ok to use CF5's Automatic read locking for application/session
scoped variables, provided that I manually lock any shared scope variable
cfset statements?

For your convenience (or irritation - grin), I've included the text from
the administrative panel:


No automatic checking or locking: This is how ColdFusion worked in 4.0.1. It
is the responsibility of the developer to protect variables with the CFLOCK
tag. If variables are not locked, data corruption may result, which may lead
to server instability.


Full checking: ColdFusion automatically checks all shared variable scope
access to ensure that it is properly locked. If a variable is not properly
locked, an error will be thrown. Note this form of lock checking should be
applied only to applications that use the SCOPE attribute of the CFLOCK tag
to specify locks, not the NAME attribute. If you have specified the NAME
attribute, ColdFusion will throw an error on any variable accessed within
the locked block if full checking is applied on the scope of the variable.


Automatic read locking: ColdFusion checks whether shared variable scope
writes are locked and automatically locks shared variable scope reads. If
ColdFusion encounters shared variable scope writes that are not locked, an
error will be thrown.


Thanks for the help!


David

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.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



RE: Automatic Read Locking in CF5

2002-05-14 Thread Craig Thomas

Is it ok to use CF5's Automatic read locking for application/session
scoped variables, provided that I manually lock any shared scope variable
cfset statements?

Yes.  Your server will have more to process so it will process it all a
little more slowly, but it works great.  I have tried both ways (on dev box)
and noticed no significant difference in speed.  Though, I lock all my reads
manually for portability's (shared hosts) sake.

-Craig


__
Get the mailserver that powers this list at http://www.coolfusion.com
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