I've always wondered the same question. Typically, I just set a flag inside
of the lock, and evaluate that flag outside of the lock. Some extra
processing, but seems the safest method.
<cfset doRedirect = "no">
<cflock....>
<cfif ...>
<cfset doRedirect = "yes">
</cfif>
</cflock>
<cfif doRedirect>
<cflocation...>
</cfif>
----- Original Message -----
From: "Tyler Silcox" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, November 15, 2001 8:30 AM
Subject: Re: Can I do this...
> I'm only reading/checking for the existence of this variable on 2 pages,
so
> it wouldn't need to be set on my global variables page. It works fine
now,
> I just wanted to make sure using cflocation before the lock was closed
> wouldn't lead to the dastardly memory corruption associated with
> cflock...anyone? anyone? Bueller?
>
> Tyler
>
> ----- Original Message -----
> From: "Douglas L. Brown" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 14, 2001 9:27 PM
> Subject: Re: Can I do this...
>
>
> Hmmm I may be crazy, but why not just lock all your sessions from the
> application.cfm
>
> Doug
>
>
> ----- Original Message -----
> From: "Tyler Silcox" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 14, 2001 6:02 PM
> Subject: Can I do this...
>
>
> > I got locks on the brain after all these emails and it has got me
> > questioning and requestioning a few things. Like...can I put a lock
> > around an if statement if it contains a cflocation tag?
> >
> > <!--- i check to see if you are continuing a valid session or not --->
> > <cflock scope="SESSION" type="READONLY" timeout="10">
> > <cfif NOT ParameterExists(session.stMyCurrentSessionStructure)>
> > <cflocation url="index.cfm?Fuseaction=#XFA.StartOver#"
> > addtoken="No">
> > </cfif>
> > </cflock>
> >
> > ..or does the lock have to be closed? (therefore, I'd have to set a
> > local variable on the read before the if)
> >
> > Tyler
> >
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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