<CFLOCK NAME="lockname"
TIMEOUT="timeout in seconds "
THROWONTIMEOUT="Yes/No">
<!--- CFML to be synchronized --->
</CFLOCK>
NAME
Optional. Specifies the name of the lock. Only one request will be able to execute inside a CFLOCK tag with a given name. Therefore, providing the NAME attribute allows for synchronizing access to the same resources from different parts of an application. Lock names are global to a ColdFusion server. They are shared between applications and user sessions, but not across clustered servers. If the NAME attribute is not provided, ColdFusion creates an anonymous lock every time CFLOCK is used in a page.
TIMEOUT
Required. Specifies the maximum amount of time in seconds to wait to obtain an exclusive lock. If an exclusive lock can obtained within the specified period, execution will continue inside the body of the tag. Otherwise, the behavior depends on the value of the THROWONTIMEOUT attribute.
THROWONTIMEOUT
Optional. Yes or No. Specifies how timeout conditions should be handled. If the value is Yes an exception will be generated to provide notification of the timeout. If the value is No execution continues past the </CFLOCK> tag. Default is Yes.
|