Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (13 sloc) 248 Bytes
require 'rubygems'
require 'redis'
server = Redis.new
puts "Pushing 1000 elements in array"
1000.times do |i|
server.lpush 'q', i
end
server.send(:disconnect)
client = Redis.new
p client.llen 'q'
loop do
p client.blpop('q', 0).last
end