BRPOP key [key ...] timeout
Time complexity: O(N) where N is the number of provided keys.
BRPOP is a blocking list pop primitive.
It is the blocking version of
RPOP because it blocks the connection when there
are no elements to pop from any of the given lists.
An element is popped from the tail of the first list that is non-empty, with the
given keys being checked in the order that they are given.
See the BLPOP documentation for the exact semantics, since
BLPOP with the only difference being that it pops elements from
the tail of a list instead of popping from the head.
Array reply: specifically:
nilmulti-bulk when no element could be popped and the timeout expired.
- A two-element multi-bulk with the first element being the name of the key where an element was popped and the second element being the value of the popped element.
dragonfly> DEL list1 list2
dragonfly> RPUSH list1 a b c
dragonfly> BRPOP list1 list2 0