module Redis::Commands::Lists
def blmpop(timeout, *keys, modifier: "LEFT", count: nil)
-
(Array
- list of popped elements or nil>)
Other tags:
- Example: With count option -
Example: Popping a element -
def blmpop(timeout, *keys, modifier: "LEFT", count: nil) raise ArgumentError, "Pick either LEFT or RIGHT" unless modifier == "LEFT" || modifier == "RIGHT" args = [:blmpop, timeout, keys.size, *keys, modifier] args << "COUNT" << Integer(count) if count send_blocking_command(args, timeout) end