summaryrefslogtreecommitdiff
path: root/src/blocked.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-05-11 18:00:32 +0200
committerantirez <antirez@gmail.com>2018-05-11 18:00:32 +0200
commit56bbab238a0fb0c14e1ca0cdb0ebadc8fb8dc945 (patch)
tree029dc8415d4d9ebbb5112d2931601b366f81e196 /src/blocked.c
parent6efb6c1e069b414305a92cf57cee31d13a84a44a (diff)
downloadredis-56bbab238a0fb0c14e1ca0cdb0ebadc8fb8dc945.tar.gz
ZPOP: change sync ZPOP to have a count argument instead of N keys.
Usually blocking operations make a lot of sense with multiple keys so that we can listen to multiple queues (or whatever the app models) with a single connection. However in the synchronous case it is more useful to be able to ask for N elements. This is a change that I also wanted to perform soon or later in the blocking list variant, but here it is more natural since there is no reply type difference.
Diffstat (limited to 'src/blocked.c')
-rw-r--r--src/blocked.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blocked.c b/src/blocked.c
index f9fd94ea1..f4b47bb82 100644
--- a/src/blocked.c
+++ b/src/blocked.c
@@ -331,7 +331,7 @@ void handleClientsBlockedOnKeys(void) {
receiver->lastcmd->proc == bzpopminCommand)
? ZSET_MIN : ZSET_MAX;
unblockClient(receiver);
- genericZpopCommand(receiver,&rl->key,1,where);
+ genericZpopCommand(receiver,&rl->key,1,where,1,NULL);
propagate(where == ZSET_MIN ?
server.zpopminCommand : server.zpopmaxCommand,