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

Function RM_ThreadSafeContextLock

src/module.cpp:5936–5940  ·  view source on GitHub ↗

Acquire the server lock before executing a thread safe API call. * This is not needed for `RedisModule_Reply*` calls when there is * a blocked client connected to the thread safe context. */

Source from the content-addressed store, hash-verified

5934 * This is not needed for `RedisModule_Reply*` calls when there is
5935 * a blocked client connected to the thread safe context. */
5936void RM_ThreadSafeContextLock(RedisModuleCtx *ctx) {
5937 UNUSED(ctx);
5938 moduleSetThreadVariablesIfNeeded();
5939 moduleAcquireGIL(FALSE /*fServerThread*/, true /*fExclusive*/);
5940}
5941
5942/* Similar to RM_ThreadSafeContextLock but this function
5943 * would not block if the server lock is already acquired.

Callers

nothing calls this directly

Calls 2

moduleAcquireGILFunction · 0.85

Tested by

no test coverage detected