CFLOCK

The CFLOCK tag provides two types of locks to ensure the integrity of shared data:

  • exclusive lock

  • read-only lock

An exclusive lock single-threads access to the CFML constructs in its body. Single-threaded access implies that the body of the tag can be executed by at most one request at a time. A request executing inside a CFLOCK tag has an "exclusive lock" on the tag. No other requests are allowed to start executing inside the tag while a request has an exclusive lock. ColdFusion issues exclusive locks on a first-come, first-served basis.

A read-only lock allows multiple requests to access the CFML constructs inside its body concurrently. Therefore, read-only locks should only be used when the shared data will only be read and not modified. ...

Get Sams Teach Yourself ColdFusion® in 21 Days 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.