Sha256: 16ad66b00940bdc6c3c07d6ff6c63d34d4063483be999c8208f32716ef44c22f

Contents?: true

Size: 538 Bytes

Versions: 17

Compression:

Stored size: 538 Bytes

Contents

# Patch for Rinda::RingFinger.primary hanging forever on Ruby 1.9.2 & 1.9.3
# from http://www.ruby-forum.com/topic/4229908
require 'rinda/ring'

module Rinda
  class RingFinger
    def lookup_ring_any(timeout=5)
      queue = Queue.new

      Thread.new do
        self.lookup_ring(timeout) do |ts|
          queue.push(ts)
        end
        queue.push(nil)
      end

      @primary = queue.pop
      raise('RingNotFound') if @primary.nil?
      while it = queue.pop
        @rings.push(it)
      end

      @primary
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
guard-spork-2.1.0 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-2.0.2 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-2.0.1 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-2.0.0 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-1.5.2 lib/guard/spork/rinda_ring_finger_patch.rb
spork-1.0.0rc4 lib/spork/run_strategy/magazine/rinda_ring_finger_patch.rb
spork-1.0.0rc4-x86-mswin32 lib/spork/run_strategy/magazine/rinda_ring_finger_patch.rb
spork-1.0.0rc4-x86-mingw32 lib/spork/run_strategy/magazine/rinda_ring_finger_patch.rb
guard-spork-1.5.1 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-1.5.0 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-1.4.3 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-1.4.2 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-1.4.1 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-1.4.0 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-1.3.0 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-1.2.3 lib/guard/spork/rinda_ring_finger_patch.rb
guard-spork-1.2.2 lib/guard/spork/rinda_ring_finger_patch.rb