class method self.lock

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.lock( fname )

No documentation comment.

Parameters

fname req
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/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

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mailbox.rb line 222 · View on GitHub · Improve this page · Find usages on GitHub

Defined in TMail::UNIXMbox

Type at least 2 characters to search.

↑↓ navigate · open · esc close