BLMPOP timeout numkeys key [key ...] <LEFT | RIGHT> [COUNT count]
- Available since:
- Time complexity:
- O(N+M) where N is the number of provided keys and M is the number of elements returned.
- ACL categories:
BLMPOP is the blocking variant of
When any of the lists contains elements, this command behaves exactly like
When used inside a
EXEC block, this command behaves exactly like
When all lists are empty, Redis will block the connection until another client pushes to it or until the
timeout (a double value specifying the maximum number of seconds to block) elapses.
timeout of zero can be used to block indefinitely.
LMPOP for more information.
Array reply: specifically:
nilwhen no element could be popped, and timeout is reached.
- A two-element array with the first element being the name of the key from which elements were popped, and the second element is an array of elements.