Ensures the integrity of shared data. Instantiates the
following kinds of locks:
* Exclusive allows single-thread access to the CFML constructs
* Read-only allows multiple requests to access CFML constructs
<cflock name="lockName" timeout="3">
lock name="lockName" timeout="3" { }
Application
request
Server
Session
true
exclusive
readonly
exclusive
cflock
lock timeout="60" scope="session" type="exclusive" {
session.myVar = "Hello";
}
<cflock timeout="60" scope="session" type="exclusive">
<cfset session.myVar = "Hello">
</cflock>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.