===================================================================
--- lib/rinda/ring.rb (revision 35596)
+++ lib/rinda/ring.rb (working copy)
@@ -203,13 +203,17 @@
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
On 2012/05/08, at 2:04, Hubert Lee wrote:
The following code correctly errors (with RingNotFound) on Ruby 1.8.6
and 1.8.7, but hangs forever on 1.9.2 and 1.9.3: