# File lib/tmail/mailbox.rb, line 222 def UNIXMbox.lock( fname ) begin f = File.open(fname, 'r+') f.flock File::LOCK_EX yield f ensure f.flock File::LOCK_UN f.close if f and not f.closed? end end