the following code works correctly for brpop, but raises an exception for blpop:
result = redis.brpop ["test_list"], 1
if result && result.size > 0 && result[0] == "test_list"
pp result[1]
else
puts "empty"
end
the above example correctly outputs the expected item. however, change brpop to blpop, and the result is Unhandled exception: Empty enumerable (Enumerable::EmptyError).
looking in the source code, i see that blpop and brpop are implemented slightly differently. does this mean they need to be used differently as well, or that there is a small inconsistency in the source?
the following code works correctly for
brpop
, but raises an exception forblpop
:the above example correctly outputs the expected item. however, change
brpop
toblpop
, and the result isUnhandled exception: Empty enumerable (Enumerable::EmptyError)
.looking in the source code, i see that
blpop
andbrpop
are implemented slightly differently. does this mean they need to be used differently as well, or that there is a small inconsistency in the source?