>- see footer for list info -<
I think Russ is right, the named lock should take care of things for you.
But if not, or if you want to do it with vars and/or database flags, look
into double locking. Which goes something like this:
<check the flag>
<lock>
<check the flag>
<code to run>
</check the flag>
</lock>
</check the flag>
You'd use this in places where you want something to happen once, like the
init code of a singleton object.
You'd most likely want something like this when this code is likely to be
called many times and you don't want to do the lock check each time, as this
tends to be more work than just checking the flag.
Sorry to complicate matters! :OD
Adrian
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Snake
Sent: 09 July 2008 18:13
To: 'Coldfusion Development'
Subject: RE: [CF-Dev] Semaphores in CF
>- see footer for list info -<
This is why you use locking to deal with race conditions, so they wouldn't
both be able to set the server variable at the same time.
Russ
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<