php3-list | 199901

Re: [PHP3] File Locking From: Dave Walton (walton <email protected>)
Date: 01/22/99

On Jan 20, Jum Winstead wrote:
>
> Another thing that is useful to know: mkdir() provides an
> essentially atomic file-check-and-create function that could be
> used for coordinated locking.

Interesting idea. I'll try to remember that next time I need locking...

> Obviously this only is useful if all of
> the applications that are accessing the file that needs such
> locking coordinate using this method.

But, as we've already established, the same is true of flock().

> It seems that none of the core (or otherwise very active)
> developers of PHP have a need for such file locking because they
> have found better solutions.

If that is true, and there are other, better solutions that are equally
simple, then perhaps the real problem is that these other solutions
just aren't well enough known. mkdir() is one example that I hadn't
thought of. Got any others?

Dave

----------------------------------------------------------------------
Dave Walton
Webmaster, Postmaster Emusic
walton <email protected> http://www.emusic.com
----------------------------------------------------------------------

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>