> Thats what I mean, best practice says use cfqueryparam, and > every document you read regardless of cfmx 5.0, 6.0, 7.0 says > when writing to a variable you will have a race condition. > > Now I can't name the version I tested this on, but I followed > one of the articles directions on how a race condition will > work. And you know what, it proves that even this version of > Coldfusion needs cflock around perstant variable writes. > > So I went back a version, and tried v7.02 on the same test, > same thing the results indicate a cflock is needed. > > So your point is?
If you expect a race condition, and you care about the outcome of that race condition, you will want to lock access to the code that would cause the race condition if run concurrently. If there is no reason to expect a race condition, or if you don't care about the outcome of the race condition, there is no need to lock access to the code in question, and there is a performance cost if you do. These cases are more common, in my experience, than the ones where you do have reason to expect a race condition and you also care about the results. In CF 5 and earlier, locking access to session, application and server scopes was required to keep your server from crashing under load. Race conditions were a distant second consideration for most CF programmers at the time. You seem to think that "best practices" are a hammer that can be used to pound every nail you can find. If programming were that simple, anyone could do it. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! This email has been processed by SmoothZap - www.smoothwall.net ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 and Flex 2 Build sales & marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275274 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

