I think that what ends up being the case is that <cflock> is actually a good powerful tool to do something important that most people ignore or would rather ignore. So often people wind up saying "oh you don't have to lock in MX" because that's the way they'd _like_ it to be, but the same problems exist in PHP and ASP.
I don't know how ASP and PHP programmers handle the issue of race conditions -- with PHP because I've not really worked with it. With ASP because in the year that I did ASP programming I never heard it mentioned. Does that mean it wasn't an issue? Probably not. In the year that I worked with ASP there were a lot of things I never did -- I never implemented COM for isntance. Does that mean that COM is a non-entity? Nope. If anything this is true. 1) If ASP or PHP don't have this problem, then they must be single-threading sessions, which is going to slow down page requests, especially under heavy load, which means that CF is one up on them because CF allows you to turn on or off the single-threading of sessions and either not worry about locking, or get more speed, dependant on your needs. 2) If ASP and PHP do have this problem and they don't have something like cflock then they're hurting and CF wins _again_ because this is an important and necessary consideration that they've overlooked. 3) If ASP and PHP have equivalents of cflock, then the only real issue is that CF programmers never hear mention of their equivalents because we're by and large not ASP or PHP programmers. Which means CF with the use of either cflock or single threaded sessions is at least as good if not better than ASP and PHP in this respect. S. Isaac Dealey Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 > Ray, > What other web scripting languages have to worry about race conditions? > As > far as I remember, ASP and PHP do not suffer from this problem. So if > this > type of functionality (not having to lock shared scope variables, which is > really anti-functionality) is attainable, how come CFMX was not programmed > in this way? After all it IS a new product. Also, you didn't answer the > main question: why does the article imply that locking is not required, > but > then imply you "might" have variable corruption issues? Either you have > to > lock or not -- how can there be an in-between when developer's need a > concrete way to work with these types of variables so they can build > robust > apps? > I'm not trying to be difficult, it just seems like this article says one > thing and then totally refutes it at the same time! :) > Andy >> -----Original Message----- >> From: Raymond Camden [mailto:jedimaster@;macromedia.com] >> Sent: Friday, November 01, 2002 11:47 AM >> To: CF-Talk >> Subject: RE: Understanding Locking In CFMX >> >> >> Maybe I'm wrong - but other languages DO have to worry about race >> conditions. It's not a question of CF missing some feature but a matter >> of fact. Now, in the past, CF could possibly crash just _reading_ these >> types of variables - and certainly that was an... issue (grin), but that >> is not the case anymore. >> > -----Original Message----- >> > From: Andrew Tyrone [mailto:atyrone@;optonline.net] >> > Sent: Friday, November 01, 2002 11:25 AM >> > To: CF-Talk >> > Subject: Understanding Locking In CFMX >> > >> > >> > There was another post about this I could've responded to, >> > but I deleted it, >> > hence this new post. >> > >> > This article: >> > >> http://www.macromedia.com/v1/Handlers/index.cfm?ID=23021&Method=Full >> >> Explains why not locking shared scopes won't crash the server, but could >> cause a "race condition" and corrupt data. What I don't get is why >> OTHER >> languages don't need locks around shared scopes, if CFMX is indeed >> thread-safe like they are (ASP to name one). Basically this article >> says >> "The good news is your server won't crash -- the bad news is, your data >> will >> be totally useless." To me, that says "You still have to lock >> everything >> you always had to, unless you want corrupt data." I'm sorry, but it >> seems >> like a lot of double-talk to me. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.

