Re: CFLOCK and CFIF
On Thursday, August 1, 2002, at 05:45 , Al Everett wrote: Or, to keep as much code in the CFLOCK as possible, this: cflock timeout=45 throwontimeout=No name=look_pick type=READONLY cfset sessionpicks = session.picks /cflock Or, in CFMX: cfif session.picks ... cfelse ... /cfif i.e., you don't need the read lock because shared scopes are 'safe' in CFMX. Also, a point of style - if session.picks is a boolean (true/false, yes/no, 1/0) why not write it as I have above? Then I'd question the actual name: picks does not sound like a boolean variable. Sean A Corfield -- http://www.corfield.org/blog/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
CFLOCK and CFIF
Hello list..Another, hopefully, quick question. Is there a problem with putting a cfif tag within a cflock? Here is an example: cflock timeout=45 throwontimeout=No name=look_pick type=READONLY cfif session.picks is Yes /cflock Do insert CFELSE CFLOCATION somewhere /CFIF Would this cause any problems? Thanks for the help! Brian Yager President - North AL Cold Fusion Users Group http://www.nacfug.com Sr. Systems Analyst Sverdrup/CIC [EMAIL PROTECTED] (256) 842-8342 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK and CFIF
Assign #session.picks# to a local variable for that comparison. -Original Message- From: Yager, Brian T Contractor/Sverdrup [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 1:16 PM To: CF-Talk Subject: CFLOCK and CFIF Hello list..Another, hopefully, quick question. Is there a problem with putting a cfif tag within a cflock? Here is an example: cflock timeout=45 throwontimeout=No name=look_pick type=READONLY cfif session.picks is Yes /cflock Do insert CFELSE CFLOCATION somewhere /CFIF Would this cause any problems? Thanks for the help! Brian Yager President - North AL Cold Fusion Users Group http://www.nacfug.com Sr. Systems Analyst Sverdrup/CIC [EMAIL PROTECTED] (256) 842-8342 __ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK and CFIF
Hello list..Another, hopefully, quick question. Is there a problem with putting a cfif tag within a cflock? Here is an example: cflock timeout=45 throwontimeout=No name=look_pick type=READONLY cfif session.picks is Yes /cflock Do insert CFELSE CFLOCATION somewhere /CFIF Would this cause any problems? Tag balancing - an open part of a tag MUST be on the same level as the close part of the tag, so you can't have a /CFLOCK inside a CFIF if the CFLOCK is before it Try cflock timeout=45 throwontimeout=No name=look_pick type=READONLY cfset myPicks=session.picks /cflock cfif session.picks is Yes Do insert CFELSE CFLOCATION somewhere /CFIF Philip Arnold Technical Director Certified ColdFusion Developer ASP Multimedia Limited Switchboard: +44 (0)20 8680 8099 Fax: +44 (0)20 8686 7911 www.aspmedia.co.uk www.aspevents.net An ISO9001 registered company. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK and CFIF
Thank you...That is what I will do! Brian Yager President - North AL Cold Fusion Users Group http://www.nacfug.com Sr. Systems Analyst Sverdrup/CIC [EMAIL PROTECTED] (256) 842-8342 -Original Message- From: Ilyinsky, Igor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 12:35 PM To: CF-Talk Subject: RE: CFLOCK and CFIF Assign #session.picks# to a local variable for that comparison. -Original Message- From: Yager, Brian T Contractor/Sverdrup [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 1:16 PM To: CF-Talk Subject: CFLOCK and CFIF Hello list..Another, hopefully, quick question. Is there a problem with putting a cfif tag within a cflock? Here is an example: cflock timeout=45 throwontimeout=No name=look_pick type=READONLY cfif session.picks is Yes /cflock Do insert CFELSE CFLOCATION somewhere /CFIF Would this cause any problems? Thanks for the help! Brian Yager President - North AL Cold Fusion Users Group http://www.nacfug.com Sr. Systems Analyst Sverdrup/CIC [EMAIL PROTECTED] (256) 842-8342 __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFLOCK and CFIF
That won't cause a problem but it can be a little slow. Generally you don't want anything but variables' assignments (cfset statements) inside a lock. That's because since it's a shared scope, you're locking the entire application from using that scope for the time its used within this one lock. That said, the only way to get around what you're doing is to move the session var into the request scope then check that. You can try it both ways to see how long they take, but there might not be much difference here. BTW, cfif picks is a little faster than cfif picks is Yes The CFIF naturally evaluates to a Boolean, so you don't have to say is YES. Chris Norloff -- Original Message -- from: Yager, Brian T Contractor/Sverdrup [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] date: Wed, 31 Jul 2002 12:15:43 -0500 Hello list..Another, hopefully, quick question. Is there a problem with putting a cfif tag within a cflock? Here is an example: cflock timeout=45 throwontimeout=No name=look_pick type=READONLY cfif session.picks is Yes /cflock Do insert CFELSE CFLOCATION somewhere /CFIF Would this cause any problems? Thanks for the help! Brian Yager President - North AL Cold Fusion Users Group http://www.nacfug.com Sr. Systems Analyst Sverdrup/CIC [EMAIL PROTECTED] (256) 842-8342 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists