Not directly, but you can cheat :-) Do something like these functions http://www.cflib.org/library.cfm?ID=17
Actually, submit it if you write it.... Here is the logic / no testing / scoping etc.. just logic <cffunction name="LockAndSet"> <cfargument name="variable" type="string" required="yes" /> <cfargument name="value" type="string" required="yes" /> <cfargument name="scope" type="string" required="yes" /> <cfargument name="timeout" type="number" required="yes" /> <cfargument name="type" type="string" required="yes" /> <cflock timeout="#arguments.timeout#" scope="#arguments.scope#" type="#arguments.type#" /> <cfset #arguments.variable# = #arguments.value#> </cflock> </cffunction> and use it <cfscript> LockAndSet("myvar","some value","session",10,"exclusive"); </cfscript> well something like that WG > -----Original Message----- > From: Ben Doom [mailto:[EMAIL PROTECTED]] > Sent: 17 December 2002 16:20 > To: CF-Talk > Subject: CFlock in CFScript > > > I asked this before, but it never landed in my inbox (nor did any replies) > so I'll ask again. > > Is it possible to lock application, session, etc. variables in a cfscript? > If so, how? > > I'm guessing it's not, but it would make my life easier and my > code cleaner > in at least one instance. :-) > > > > --Ben Doom > Programmer & General Lackey > Moonbow Software > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm