BLMPOP
Since 1.1.0Lists
Syntax
BLMPOP timeout numkeys key [key ...] LEFT|RIGHT [COUNT count]LMPOP that waits until one of the lists has an element, or timeout seconds have passed.
Reply
- A two-element array: the key popped from, and the elements.
nilif the timeout passed.
Examples
> RPUSH b2 1 2
(integer) 2
> BLMPOP 1 2 b0 b2 LEFT COUNT 3
1) "b2"
2) 1) "1"
2) "2"