Paul's hash method works well for that too (and can potentially make
the lock name a little more manageable, depending on the length of the
file path). The double lock or something similar would be necessary,
since we are dealing with two files that need to be locked (the old
name and the new).

I haven't put time into working out if it's theoretically possible to
get a deadlock with the double lock technique in this situation
though.

On 12/11/06, Massimo Foti <[EMAIL PROTECTED]> wrote:
> >> As long as anyone else using those files in their code uses exactly
> >> the same name, it will work.
> >>
> > Thanks James.
> > And I suppose, when running on a shared server, it doesnt hurt to reduce
> > the likelyhood of a conflict by using a more unique name like
> > FileChange3076 instead of FileChange
>
> An easy way to ensure a unique name for such a kind of locks is to use the
> file's full path name as lock's name. That's the way I implemented it on
> this CFC:
> http://www.olimpo.ch/tmt/cfc/tmt_file_io/
>
> ----------------------------
> Massimo Foti, web-programmer for hire
> Tools for ColdFusion and Dreamweaver developers:
> http://www.massimocorner.com
> ----------------------------
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263504
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to