O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Named Locks instead of SCOPE

You’ve seen why locks are sometimes needed to avoid race conditions. You’ve seen the simplest way to implement them—with Exclusive locks. You’ve seen how to avoid potential bottlenecks by using a mix of Exclusive and ReadOnly locks. Hopefully, you’ve noticed a pattern emerging: If you’re worried about race conditions, your goal should be to protect your data with <cflock>, but to do so in the least obtrusive way possible. That is, you want your code to be “smart” about when page requests wait for each other.

So far, all of the <cflock> tags in this chapter have been scoped locks. Each has used a scope="Application" attribute to say, “This lock should block or be blocked by all other locks in the application.” ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required