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