Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* 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
  • Loading branch information...
commit 113b94e1452048cb88d512d3ab22dfa5f7c2930e 1 parent a089fe0
seki authored
Showing with 11 additions and 2 deletions.
  1. +5 −0 ChangeLog
  2. +6 −2 lib/rinda/ring.rb
View
5 ChangeLog
@@ -1,3 +1,8 @@
+Wed May 9 04:31:26 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
+
+ * lib/rinda/ring.rb (lookup_ring_any): fix Rinda::RingFinger.primary
+ hungs forever. [ruby-talk:395364]
+
Tue May 8 21:09:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* include/ruby/win32.h (FD_SET): change function to macro.
View
8 lib/rinda/ring.rb
@@ -203,13 +203,17 @@ def lookup_ring_any(timeout=5)
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
Please sign in to comment.
Something went wrong with that request. Please try again.