Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of cosimo (4138)

Thursday May 22, 2008
05:20 PM

Regarding file locking...

[ #36497 ]

This should have gone out as a reply to AdamK, but use.perl.org doesn't want to collaborate. Sorry Adam.

For sure, if there's one thing that's a pain is file locking. I have no recommendations for you, but recently for $work, I wrote a class for general file locking, not just a script (yes, I know, don't tell me).

For about 6-7 years I've been using Fcntl and flock without problems, but now it's different. I need to gracefully handle file locking even on NFS volumes and with many concurrent hosts that write on the same nfs share.

And yes, it's crazy. And no, File::NFSLock doesn't work for me. LockFile::Simple does, but needs to be tweaked, hence my class that extends and "fix" it... :)

Me too: any recommendations?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I probably should not even admit in public that I did/do this.

    But...

    I build web apps that sometimes need "locking", and the app may actually be running on multiple machines between requests. (or even at the same time)

    So...

    I use this [mysql.com]. (figured they already solved the locking problem... I might as well use it)