Actually the code does work by creating a deadlock for the session and waits until a timeout occurs before page proscessing can begin again. At least that's what I think it's doing. I tested it out for what I needed and it appears to be functioning.
But does this effect only this one user session? Will anyone other user trying to access this page be locked out of the protected section of the page? And does anyone know what the maximum TIMEOUT value can be for this cflock tag? or what is safe? Brian Ferrigno -----Original Message----- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 5:37 PM To: CF-Talk Subject: RE: Delaying template execution > > What would be the best way to dealy the execution of a cf > > tamplate by x amount of seconds? > > Simplest way: > > <CFSET Sleep=5> > <CFSET Start=GetTickCount()> > <CFTRY> > <CFLOCK SCOPE="SESSION" TIMEOUT="#Sleep#" TYPE="READONLY"> > <CFLOCK SCOPE="SESSION" TIMEOUT="#Sleep#" TYPE="EXCLUSIVE"> > </CFLOCK> > </CFLOCK> > <CFCATCH></CFCATCH> > </CFTRY> > <CFSET End=GetTickCount()> > <CFSET Elapsed=End-Start> > <CFOUTPUT>Elapsed: #Elapsed#ms</CFOUTPUT> > > Of course, this will lock your entire session. Anything else > trying to obtain a lock in that sessionwill also be delayed. That's not going to do anything. The TIMEOUT attribute of CFLOCK doesn't specify the length that the lock will be held open, just the length CF will wait before giving up when trying to acquire the lock. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

