Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started
by Ben Forta, Raymond Camden, Charlie Arehart
Nested Locks and Deadlocks
It’s usually okay to nest named locks within one another, as long as the name for each lock block is different. However, if they aren’t nested in the same order in all parts of your code, it’s possible that your application will encounter deadlocks while it runs. Deadlocks are situations where it’s impossible for two page requests to move forward because they are each requesting a lock that the other already has. Consider a template with an Exclusive lock named LockA, with another <cflock> named LockB nested within it. Now consider another template, which nests LockA within LockB. If both templates execute at the same time, the first page request might be granted an Exclusive lock for LockA, and the second could get ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access