There were memory corruption issues pre MX (I believe). Currently, I don't believe you ever need to lock, unless you are running code that needs a lock.
You can generate race conditions on the session scope by opening multiple windows to the same site, so just because you're not using frames, it doesn't mean you don't have race conditions. You don't need to lock reads unless you really care about those reads. Something like this: <cfset amount=session.total> <cfset amount=amount-form.amount> <cfset session.total=amount> It's possible that there could be a race condition here, and you would need to lock the whole block in an exclusive lock to prevent it. Russ > -----Original Message----- > From: James Holmes [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 30, 2007 7:04 PM > To: CF-Talk > Subject: Re: Quick Question: Should I lock Session Scope Reads in MX 7 > > In CFMX, locking is only necessary if a race condition can be > encountered. Since this is the session scope, unless you are using > frames or otherwise simulrtaneously requesting data from the same > session, race conditions will not occur. You therefore do not need to > lock if this criterion is met. > > On 1/31/07, Bryan Stevenson <[EMAIL PROTECTED]> wrote: > > Nope I said I'm not 100% sure if it would be required for reads (mainly > because > > I don't use them). > > > > My understanding of the auto-locking feature was if it's on you're fine > and if > > it's not then you must lock. Charlie thinks that for reads you should > be OK. > > So it may not be as black & white as I think. > > > > Sorry I can't confirm or deny on this one ;-) > > > > Cheers > > > > Bryan Stevenson B.Comm. > > VP & Director of E-Commerce Development > > Electric Edge Systems Group Inc. > > phone: 250.480.0642 > > fax: 250.480.1264 > > cell: 250.920.8830 > > e-mail: [EMAIL PROTECTED] > > web: www.electricedgesystems.com > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268153 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

