Further to this if you want your app to be "backwards" compatible with previous incarnations of CF then locking is still important. The section regarding Race Conditions makes for good reading. You would never want this issue to crop up in a production environment.
Peter Tilbrook ColdFusion Applications Developer ColdGen Internet Solutions 4/73 Tharwa Road Queanbeyan, NSW, 2620 AUSTRALIA Telephone: +61-2-6284-2727 Mobile: +61-0439-401-823 E-mail: [EMAIL PROTECTED] World Wide Web: http:/www.coldgen.com/ -----Original Message----- From: Alan Ford [mailto:[EMAIL PROTECTED] Sent: Saturday, 16 August 2003 6:21 PM To: CF-Talk Subject: cflock - what does it do? Exactly? I've seen <cflock scope = "session" type = "exclusive"> described in two ways in the documentation (and I have my own, different, understanding of it) - I'd be interested to know which one is true. a) It holds the only exclusive lock for that session. Any other code for the session can run; the only thing that will be stopped is another attempt to take a session lock (either exclusive, or read-only) [my own intuitive understanding of cflock] b) 'An exclusive lock single-threads access to the CFML constructs in its body. Single-threaded access implies that the body of the tag can be executed by at most one request at a time. A request executing inside a cflock tag has an "exclusive lock" on the tag. No other requests can start executing inside the tag while a request has an exclusive lock. ColdFusion issues exclusive locks on a first-come, first-served basis' [mm website - http://livedocs.macromedia.com/coldfusion/5.0/CFML_Reference/Tags57.htm] So, if the lock contained <cfset> and <cfparam> statements then nothing else in that session could execute a <cfset> or <cfparam> statement until the exclusive lock was cleared c) 'once inside a locked block of code, all other threads are queued until the thread with the exclusive lock relinquishes control' [cfmx web application construction kit] Regards, Alan Ford ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com