1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rinda/ring.rb (lookup_ring_any): fix Rinda::RingFinger.primary

hungs forever. [ruby-talk:395364]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
seki 2012-05-08 19:35:07 +00:00
parent a089fe010e
commit 113b94e145
2 changed files with 11 additions and 2 deletions

View file

@ -203,13 +203,17 @@ module Rinda
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 = queue.pop
raise('RingNotFound') if @primary.nil?
@primary
end