User Guide
44 Chapter 2: ColdFusion Tags
<!--- Use the application scope for the application variable to prevent race
condition. This variable keeps track of total number of turtlenecks sold. --
->
<cflock scope = "Application" timeout = "30" type = "Exclusive">
<cfset application.number = application.number + session.numPurchased>
</cflock>
</cfif>
<cfoutput>
E-Turtleneck is proud to say that we have sold #application.number# turtlenecks
to date.
</cfoutput>
<!--- End of Application.cfm --->