Bare in mind that there are multiple reasons to lock, not just server
stability. There are also logical reasons to lock.

Consider this scenario:

A file contains a number.
You read the file, add one to the number, and save.

Now, without a lock, its possible that two threads might read the file,
and append the incorrect number.

In this case, the lock is used for logical reason.

=======================================================================
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: Jim McAtee [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, January 08, 2002 11:53 AM
> To: CF-Talk
> Subject: Re: CFLOCK on files
> 
> 
> Even if you can't explicitly lock a file during a CFFILE 
> operation... If CF
> uses system-level function calls to read and write files 
> (that must be why
> it's capable of being locked out of a file when another 
> application has it
> locked), then you would think that during a CF file write 
> operation, the OS
> must place a lock on the file.  Or no?
> 
> The reason I brought up the point in the first place is that 
> I need to read
> and write a large number of small text files that are in use 
> by another,
> very busy service.  I'm hoping that by doing so, I wouldn't be causing
> problems for that application, or for CF itself.
> 
> Jim
> 
> 
> ----- Original Message -----
> From: "Jochem van Dieten" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, January 07, 2002 5:24 PM
> Subject: Re: CFLOCK on files
> 
> 
> > Kelly Matthews wrote:
> >
> > > as far as I know it's not something that can be done. 
> CFLOCK is strictly
> for
> > > sessions, etc.
> >
> >
> > CFLOCK is for single threading CF. Whatever you do inside 
> that single
> > threaded application is not of CFs concern.
> >
> >
> > > CFFILE doesn't allow you to add a system level lock on a file nor
> release a
> > > lock.
> >
> >
> > Unfortunately not.
> >
> > Jochem
> 
______________________________________________________________________
Why Share?
  Dedicated Win 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=coldfusionc
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

Reply via email to