Forwarding this from CF-Talk, only because I know some of you do not read through every message on CF-Talk, may not be subscribed, may not care, whatever, but .... I thought there was some good info in here, something to keep in mind in case someone told you with the new release of CFMX, you don't need to lock anything ...
Just looking out for my friends... :) Erika ------------------------------------------------------------ >>| -----Original Message----- >>| From: Christine Lawson [mailto:[EMAIL PROTECTED]] >>| Sent: 01 May 2002 22:00 >>| To: CF-Talk >>| Subject: RE: CF Wishlist >>| >>| >>| Hi, >>| The Java data structures Neo uses as scopes are designed to >>| be thread-safe. But we still recommend using cflock. >>| >>| This is some wisdom from Tom Harwood: >>| >>| "That said, our "best practices" recommendation is still to >>| use <CFLOCK> as before to protect access to shared data; we >>| recommend this for several reasons: >>| >>| o Code that is correctly locked could (assuming it is >>| otherwise correct) be proved to do what it's intended to do. >>| o Code that is not correctly locked may give different >>| results depending on what other requests may be >>| concurrently modifying shared data; no theorem can account >>| for this. >>| o Code that is correctly locked can be run on a CF MX >>| installation or a CF5 installation. >>| The <CFLOCK> tag has low overhead. >>| >>| My own $.02 -- I have written server software for 17 years. >>| I've done operating systems (IBM VM/ESA 2.0), databases >>| (Model 204 and Progress), ColdFusion, and other systems >>| that ran many threads through shared data. Correct and fast >>| access to shared data is one of my first and last design >>| considerations whenever I design code. >>| >>| "Locking -- it's not just the law, it's a really, really >>| good idea." :) >>| >>| Hope this helps, and best regards, >>| -- >>| Tom Harwood >>| Neo Compiler/Runtime Development >>| Please respond to this forum, so that others can >>| participate and share. Thanks! >>| >>| >>| >>| Attachments: <!--- >>| This code will not make Neo explode or turn into a frog >>| or anything -- to my mind that is *bad.* A core dump >>| is a better thing than silently corrupted data. >>| ---> >>| >>| <!--- no CFLOCK ---> >>| <cfset session.cartTotal = session.cartTotal + currentPrice> >>| <!--- >>| There really is enough time between the right-hand side >>| read of session.cartTotal and the left-hand-side write >>| for another request to get in before us and modify >>| session.cartTotal; our CFSET will step on that other >>| request's data. That is bad. >>| ---> >>| " >>| >>| Hope that helps, >>| Christine >>| >>| >>| >>| -----Original Message----- >>| From: Gyrus [mailto:[EMAIL PROTECTED]] >>| Sent: Wednesday, May 01, 2002 4:49 PM >>| To: CF-Talk >>| Subject: Re: CF Wishlist >>| >>| >>| > From: "Raymond Camden" <[EMAIL PROTECTED]> >>| > >>| > cflock is _not_ necessary for memory issues anymore. You >>| still need it >>| > for logical reasons. For example: >>| > >>| > application.x = application.x + 1 >>| >>| Whoah - not been following this thread closely, but did I >>| miss something? You don't need to habitually lock Session, >>| Server and Application variables anymore in CFMX? >>| >>| - Gyrus >>| ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
