On 2006-01-22, Mark Volkmann <r.mark.volkmann / gmail.com> wrote: > I'm trying to understand usage of file.flock(File::LOCK_SH) > ... What's the point of a lock if it isn't locking anybody else out? A shared lock locks out anyone who wants an exclusive lock. Typically you want an exclusive lock for writing to a file and a shared lock for reading it. That's because it's OK for several people to read a file simultaneously, but if someone wants to write to it then no-one else should be allowed to read *or* write, otherwise hilarity may ensue. Cheers, Jeremy Henty