YOu might be better to do something like this -
<!--- Application.cfm --->
<cflock type="exclusive"....>
<!--- Create your application variables here --->
</cflock>
<!--- "CHEAT" by copying the application structure --->
<!--- into a local struct that you can read from as --->
<!--- much as you want --->
<cflock type="readonly" ...>
<cfset theAPPLICATION = Duplicate( Application )>
</cflock>
That way you lock the minimum amount of code for the minimum
amount of time, and you're free to read from that local struct
without having to worry about locking.
HTH
Cheers,
Alistair Davidson
Senior Web Developer
Rocom New Media
www.rocomx.net
-----Original Message-----
From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
Sent: 05 June 2001 16:29
To: CF-Talk
Subject: CFLOCK viability?
I create a bunch of application scope variables within application.cfm -
these will only be created once, and hardly ever change.
In a custom tag I read those variables - and of course I need to lock that
READ. Is it viable to put a CFLOCK of type READONLY around a big block of
code (i.e. 170 lines). I am reading these variables a lot in this custom
tag, and it would be ideal (in terms of coding effort :-) to simply lock the
whole lot.
Thank you
Steve
Development Manager
Vardus Internet Solutions (SA)
Tel: (+27) 21 670 9880
Fax: (+27) 21 674 4549
Email: [EMAIL PROTECTED]
Website: www.vardus.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists