Matt,

The code is run sequencially from top to bottom anyways.  Your locking
really does nothing for you except disallow concurrent access by multiple
requests.

This does the same thing:
<cf_foo run="1ST">
<cf_foo run="2ND">
<cf_foo run="3RD">
<cf_foo run="4TH">

Now, is this just one template that is called as a scheduled task?  What is
the interval of the task?  Are you concerned that there will be overlap
among instances of the task?  If this is the case, then using CFLOCK might
make sense.

Paul Kenney
[EMAIL PROTECTED]
916-212-4359

> -----Original Message-----
> From: Matt Robertson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 05, 2004 4:07 PM
> To: CF-Talk
> Subject: Serialize a series of tag calls?
>
>
> I have four calls to a particular tag.  Call it cf_foo.  I
> want to run it like so from a calling template:
>
> <cf_foo run=1st>
> <cf_foo run=2nd>
> <cf_foo run=3rd>
> <cf_foo run=4th>
>
> Each instance of the tag makes a db entry as to its time of
> completion.  I want thes entries to always be in the same
> sequence; one that matches the order in which they were called.
>
> So I got the bright idea of setting
>
> <cfset variables.tempLockName=CreateUUID();>
>
> and then calling each tag like this:
>
> <cflock
> name="#variables.tempLockName#"
> type="EXCLUSIVE"
> timeout="10">
> <cf_foo run=1ST>
> </cflock>
> <cflock
> name="#variables.tempLockName#"
> type="EXCLUSIVE"
> timeout="10">
> <cf_foo run=2ND>
> </cflock>
>
> and so on until I'm done.  The idea was the common lock name
> would force serial execution (This is a scheduled task so no
> concurrent user access issues).
>
> Given the above limiting circumstances, is this a sound
> method of forcing stuff to be run in top-down order, or is
> there a better way?
>
> --
> -------------------------------------------
>  Matt Robertson,     [EMAIL PROTECTED]
>  MSB Designs, Inc. http://mysecretbase.com
> -------------------------------------------
>
> --
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to