On Sunday, September 22, 2002, at 10:51 , Dave Watts wrote:
> 2. If you're using any version of CF which supports the SCOPE attribute
> (4.5+, I think), use that with your CFLOCK tags around memory variables.
Just curious, do pre-MX versions of CF require scope-level locking (as
opposed to named locks) for safe access to session variables?
In MX, it seems better practice to use named locks instead of scoped locks
since that reduces the conflict between processes, e.g., if your session
variable is 'x' then you might have:
<cflock name="session_x" ...>
<cfset session.x = 42/>
</cflock>
Note 1: that to read the variable in MX, you wouldn't need to lock.
Note 2: MX won't get corrupted if you omit locks - you only need locks to
avoid race conditions.
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
______________________________________________________________________
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists