Class: Mutex

Inherits:
Object show all
Defined in:
lib/mongo/util/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#lock_with_hackObject Also known as: lock



74
75
76
77
78
79
80
81
82
83
# File 'lib/mongo/util/core_ext.rb', line 74

def lock_with_hack
  lock_without_hack
  rescue ThreadError => e
  if e.message != "deadlock; recursive locking"
    raise
  else
    unlock
    lock_without_hack
  end
end