# File lib/thread.rb, line 145
  def exclusive_unlock
    return unless @locked
    Thread.exclusive do
      @locked = false
      begin
        t = @waiting.shift
        t.wakeup if t
      rescue ThreadError
        retry
      end
      yield
    end
    self
  end