We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0a0f03 commit 6b6e6f6Copy full SHA for 6b6e6f6
src/module.cpp
@@ -3930,6 +3930,8 @@ void RM_FreeThreadSafeContext(RedisModuleCtx *ctx) {
3930
void RM_ThreadSafeContextLock(RedisModuleCtx *ctx) {
3931
UNUSED(ctx);
3932
moduleAcquireGIL(FALSE /*fServerThread*/);
3933
+ if (serverTL == nullptr)
3934
+ serverTL = &g_pserver->rgthreadvar[IDX_EVENT_LOOP_MAIN]; // arbitrary module threads get the main thread context
3935
}
3936
3937
/* Release the server lock after a thread safe API call was executed. */
0 commit comments