summaryrefslogtreecommitdiff
path: root/lib/rinda/ring.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rinda/ring.rb')
-rw-r--r--lib/rinda/ring.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/rinda/ring.rb b/lib/rinda/ring.rb
index 3ff4606e2a2..8a2a201c8a5 100644
--- a/lib/rinda/ring.rb
+++ b/lib/rinda/ring.rb
@@ -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