Project

General

Profile

Bug #882 ยป sync.rb-1.8.6-fix.diff

angdraug (Dmitry Borodaenko), 12/15/2008 06:19 PM

View differences:

sync.rb 2007-05-09 01:04:37.000000000 +0100
54 54
  # exceptions
55 55
  class Err < StandardError
56 56
    def Err.Fail(*opt)
57
      Thread.critical = false
57 58
      fail self, sprintf(self::Message, *opt)
58 59
    end
59 60
    
......
129 130
  
130 131
  # locking methods.
131 132
  def sync_try_lock(mode = EX)
132
    return unlock if sync_mode == UN
133
    return unlock if mode == UN
133 134
    
134 135
    Thread.critical = true
135
    ret = sync_try_lock_sub(sync_mode)
136
    ret = sync_try_lock_sub(mode)
136 137
    Thread.critical = false
137 138
    ret
138 139
  end