MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rpoplpushCommand

Function rpoplpushCommand

app/redis-6.2.6/src/t_list.c:849–851  ·  view source on GitHub ↗

This is the semantic of this command: * RPOPLPUSH srclist dstlist: * IF LLEN(srclist) > 0 * element = RPOP srclist * LPUSH dstlist element * RETURN element * ELSE * RETURN nil * END * END * * The idea is to be able to get an element from a list in a reliable way * since the element is not just returned but pushed against another list * as well. This comm

Source from the content-addressed store, hash-verified

847 * as well. This command was originally proposed by Ezra Zygmuntowicz.
848 */
849void rpoplpushCommand(client *c) {
850 lmoveGenericCommand(c, LIST_TAIL, LIST_HEAD);
851}
852
853/*-----------------------------------------------------------------------------
854 * Blocking POP operations

Callers

nothing calls this directly

Calls 1

lmoveGenericCommandFunction · 0.85

Tested by

no test coverage detected