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 ReadOnly Locks

Okay, you’ve seen how Exclusive locks work. They simply make sure that no two blocks of the same scope are allowed to execute at once. If two requests need the same lock at the same time, the first one blocks the second one. But in some situations this can be overkill, and lead to more waiting around than is really necessary.

ColdFusion also provides ReadOnly locks, which are less extreme. ReadOnly locks don’t block each other. They only get blocked by Exclusive locks. In plain English, a ReadOnly lock means, “If the variables in this block are being changed somewhere else, wait until the changes are finished before running this block.” Use a ReadOnly lock if you have some code that definitely needs to read the correct, ...

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