?
This document uses PHP Chinese website manual Release
BRPOP key [key ...] timeout
自2.0.0起可用。
時間復(fù)雜度: O(1)
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.
請參閱BLPOP文檔以了解確切的語義,因為BRPOP與BLPOP相同,唯一的區(qū)別是它從列表的尾部彈出元素,而不是從頭部彈出。
陣列回復(fù):具體為:
nil
當(dāng)沒有元件可以被彈出多批量和超時過期。
第一個元素是元素被彈出的鍵的名稱,第二個元素是彈出元素的值的兩元素的多塊。
redis> DEL list1 list2(integer) 0 redis> RPUSH list1 a b c(integer) 3 redis> BRPOP list1 list2 01) "list1"2) "c"