You DO want your names to be unique if they are not the same... thing. For example, if two templates are writing to a file, foo.txt, then they should use the same name for the locks. But, if one writes to jacob.txt, and one ot ray.txt, then you should use differnet names.
======================================================================= Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email : [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 08, 2002 12:53 PM > To: CF-Talk > Subject: RE: CFLOCK on files > > > Chris, > > I like your explination. Can you clarify - if I use 2 locks > with the same > name do they work synchronously then? I had always thought I > had to ensure > that all my lock names were unique (when using names). > > Mark > > -----Original Message----- > From: Chris Norloff [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 08, 2002 5:38 AM > To: CF-Talk > Subject: RE: CFLOCK on files > > > No, cflock isn't limited to locking variables. Yes, cflock > is used for mem > ory variables (server, session, application) but remember > cflock doesn't "l > ock" anything, it merely coordinates access between similar > locks (same sco > pe or same name). > > If you use cflock with the name attribute, all you're doing > is coordinating > all the cflocks with that same name attribute. And inside > the cflock can > be anything - I use it around a cffile so our app doesn't try > to write to a > particular file when someone else is writing to it at the same time. > > Chris Norloff > > > ---------- Original Message ---------------------------------- > from: Kelly Matthews <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > date: Mon, 7 Jan 2002 19:18:34 -0500 > > >as far as I know it's not something that can be done. CFLOCK > is strictly f > or > >sessions, etc. > >CFFILE doesn't allow you to add a system level lock on a > file nor release > a > >lock. Would > >be nice though. :) I could be wrong but I don't think it has that > >capability. > > > >-----Original Message----- > >From: Jim McAtee [mailto:[EMAIL PROTECTED]] > >Sent: Monday, January 07, 2002 6:33 PM > >To: CF-Talk > >Subject: CFLOCK on files > > > > > >Does CF set an operating system level file lock on files > being accessed > >within a named CFLOCK? Or is this handled by CFFILE? Or at all? > > > >Jim > > > > ______________________________________________________________________ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists