redis_ring_client 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -163,9 +163,13 @@ module RedisRing
|
|
|
163
163
|
end
|
|
164
164
|
|
|
165
165
|
def each_connection(&block)
|
|
166
|
+
threads = []
|
|
166
167
|
ring_meta_data.ring_size.times do |shard_no|
|
|
167
|
-
|
|
168
|
+
threads << Thread.new do
|
|
169
|
+
block.call(connection_pool.connection(shard_no))
|
|
170
|
+
end
|
|
168
171
|
end
|
|
172
|
+
threads.each { |thread| thread.join }
|
|
169
173
|
end
|
|
170
174
|
|
|
171
175
|
protected
|