End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Rinda::RingFinger#lookup_ring_any
lookup_ring_any(timeout=5)
lib/rinda/ring.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rinda/ring.rb, line 390
def lookup_ring_any(timeout=5)
queue = Thread::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?
Thread.new do
while it = queue.pop
@rings.push(it)
end
end
@primary
end
Returns the first found remote TupleSpace. Any further recovered TupleSpaces can be found by calling to_a.