summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/brpop.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-03-21 10:28:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-02-07 11:16:53 +0000
commit06cba6ccd165ca8b224797e37fccb9e63f026d77 (patch)
treee82f1bc439997ae296f2e74f8a64d84c5d95f140 /iredis/data/commands/brpop.md
parentInitial commit. (diff)
downloadiredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.tar.xz
iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.zip
Adding upstream version 1.9.1.upstream/1.9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/brpop.md')
-rw-r--r--iredis/data/commands/brpop.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/iredis/data/commands/brpop.md b/iredis/data/commands/brpop.md
new file mode 100644
index 0000000..e0bb650
--- /dev/null
+++ b/iredis/data/commands/brpop.md
@@ -0,0 +1,31 @@
+`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][cb] for the exact semantics, since `BRPOP` is
+identical to `BLPOP` with the only difference being that it pops elements from
+the tail of a list instead of popping from the head.
+
+[cb]: /commands/blpop
+
+@return
+
+@array-reply: specifically:
+
+- A `nil` multi-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.
+
+@examples
+
+```
+redis> DEL list1 list2
+(integer) 0
+redis> RPUSH list1 a b c
+(integer) 3
+redis> BRPOP list1 list2 0
+1) "list1"
+2) "c"
+```