MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / RM_ReplyWithEmptyArray

Function RM_ReplyWithEmptyArray

src/module.cpp:1615–1623  ·  view source on GitHub ↗

Reply to the client with an empty array. * * The function always returns REDISMODULE_OK. */

Source from the content-addressed store, hash-verified

1613 *
1614 * The function always returns REDISMODULE_OK. */
1615int RM_ReplyWithEmptyArray(RedisModuleCtx *ctx) {
1616 client *c = moduleGetReplyClient(ctx);
1617 if (c == NULL) return REDISMODULE_OK;
1618 AeLocker locker;
1619 std::unique_lock<fastlock> lock(c->lock);
1620 locker.arm(c);
1621 addReply(c,shared.emptyarray);
1622 return REDISMODULE_OK;
1623}
1624
1625/* When RedisModule_ReplyWithArray() is used with the argument
1626 * REDISMODULE_POSTPONED_ARRAY_LEN, because we don't know beforehand the number

Callers

nothing calls this directly

Calls 3

moduleGetReplyClientFunction · 0.85
addReplyFunction · 0.85
armMethod · 0.80

Tested by

no test coverage detected