From: ara.t.howard@... Date: 2006-10-25T07:27:22+09:00 Subject: Re: File#flock as a cross-process mutex On Wed, 25 Oct 2006 khaines@enigo.com wrote: > On Wed, 25 Oct 2006 ara.t.howard@noaa.gov wrote: > >> note that this is file based, not flock based so, while the performance >> isn't >> that of flock, it's not bad either. though i'm guessing from your use case >> you are locking too often... > > It works very well, but doesn't work on Windows, though. Ara, if I sent you > my hack that provides flock based locking if a) specifically requested or b) > the default file based algorithm fails, would you be interested in > integrating it into your current codebase, in a less ugly fashion? > > That would render your lockfile.rb very cross-platform capable. > > Kirk Haines i'm interested. remember though that flock will fail if rpc.statd isn't running is firewalled (common). also, flock locks and fcntl (posix) are incompatible on many *nixes... it's damn ugly if you ask me. anyhow, it would be good to have a a cross platform lockfile lib. send me some or code or just you thoughts. cheers. -a -- my religion is very simple. my religion is kindness. -- the dalai lama