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

Function RM_BlockClientOnKeys

src/module.cpp:5567–5569  ·  view source on GitHub ↗

This call is similar to RedisModule_BlockClient(), however in this case we * don't just block the client, but also ask Redis to unblock it automatically * once certain keys become "ready", that is, contain more data. * * Basically this is similar to what a typical Redis command usually does, * like BLPOP or BZPOPMAX: the client blocks if it cannot be served ASAP, * and later when the key rec

Source from the content-addressed store, hash-verified

5565 * callback in that case).
5566 */
5567RedisModuleBlockedClient *RM_BlockClientOnKeys(RedisModuleCtx *ctx, RedisModuleCmdFunc reply_callback, RedisModuleCmdFunc timeout_callback, void (*free_privdata)(RedisModuleCtx*,void*), long long timeout_ms, RedisModuleString **keys, int numkeys, void *privdata) {
5568 return moduleBlockClient(ctx,reply_callback,timeout_callback,free_privdata,timeout_ms, keys,numkeys,privdata);
5569}
5570
5571/* This function is used in order to potentially unblock a client blocked
5572 * on keys with RedisModule_BlockClientOnKeys(). When this function is called,

Callers

nothing calls this directly

Calls 1

moduleBlockClientFunction · 0.85

Tested by

no test coverage detected