Race conditions are what I am referring to and they are a problem, even in CF9. Many developers either heard or read that the earlier problems with session variables have been fixed and that they no longer need to ever lock them, but this is not true. It is one of the most common CF misconceptions, even among experienced CF programmers. The problem generally only shows up on high-traffic data intensive sites, but even with 1000 simultaneous users and 250 session variables I would expect that the application will at some point have a seemingly random and rare issue when updating large structures of session variables or processing giant form submissions that could ultimately be traced back to a race condition where competing code execution process are accessing the same shared resource on different threads. The cflock tag still exists, and it is usually not used as frequently as it needs to be used, which is why I mentioned the problem. The use of the cflock tag is not simply a matter of preference. It solves an actual problem related to the multi-threaded code accessing shared resources, such as session variables.
>From the CF9 manual: "ColdFusion lets you lock access to sections of code to ensure that ColdFusion does not attempt to run the code, or access the data that it uses, simultaneously or in an unpredictable order. This locking feature is important for ensuring the consistency of all shared data, including data in external sources in addition to data in persistent scopes." I think many developers would prefer to ignore the issue because locking isn't fun and race conditions are a challenging issue to understand. -Mike Chabot On Wed, Feb 1, 2012 at 3:03 PM, Cameron Childress <[email protected]> wrote: > This is largely false since the release of CF6. Race conditions being the > primary exception. > > -Cameron ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349728 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

