<cflock> Tag Syntax

Now that you know what race conditions are and how they can lead to unpredictable results, it’s time to learn how to use locking to avoid them. We’ll get into the nuances shortly, but the basic idea is to place opening and closing <cflock> tags around any part of your code that changes application variables (or session variables, which are discussed in the next chapter) or any other type of information that might be shared or changed by concurrent page requests. Table 19.5 takes a closer look at the tag’s syntax.

Table 19.5. <cflock> Tag Syntax
AttributeDescription
typeOptional. The type, or strength, of the lock. Allowable values are Exclusive and ReadOnly. You should use Exclusive to indicate blocks of code that change the ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.