torwig commented on PR #594: URL: https://github.com/apache/incubator-kvrocks/pull/594#issuecomment-1136049097
@git-hulk I had a similar idea, but then I read the Redis docs: > When called without the count argument: > Bulk string reply: the value of the first element, or nil (**$-1**) when key does not exist. > When called with the count argument: > Array reply: list of popped elements, or nil (***-1**) when key does not exist. and I saw that BLPOP/BRPOP and RPopLPush use just `Pop` without `count` option, so I decided to leave `Pop` for popping a single element and introduce `PopMulti` for popping more than one element. Additionally, it's more explicit to return multiple elements from `PopMulti` inside a vector than to return just a single element inside a vector (if it's a special case for pop). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
