Re: Is file is being used



"Mike Klaene" <mklaene@xxxxxxxxxxx> wrote in message
news:5RUfh.2129$HX4.2040@xxxxxxxxxxx
What I find to be amazing is that this thread exists in 2006.

Me too, but not for the reason you apparently find it to be.

A system on which I was programming in 1976 that only had 16K of RAM and
supported up to 16 attached (via coax) workstations supported the concept
of "Open Private". Stated simply, if a file was already open, even if the
other workstation had done an "Open Shared", my open would fail. The unit
that functioned as the "cluster controller" took care of this for me. File
and record locks were forced, not cooperative.

They are as well under Windows (and other operating systems for that
matter...I can't think of a single multi-process operating system that
*doesn't* have this feature).

That some people may want to write code that attempts to add yet another
layer on top of the file system doesn't change the fact that the file system
itself provides this functionality inherently. It only illustrates the
foolishness of trying to layer a cooperative file locking mechanism on top
of the built-in operating system mechanism.

Pete


.


Loading