Skip to content

Commit c4150d6

Browse files
committed
fixed scriptRun_ctx comments
1 parent bd9911a commit c4150d6

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/execution/execution_contexts/scriptRun_ctx.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,9 @@ void RAI_ScriptRunCtxFree(RAI_ScriptRunCtx *sctx) {
6969
}
7070
}
7171

72-
RedisModuleCtx *ctx = RedisModule_GetThreadSafeContext(NULL);
7372
for (size_t i = 0; i < array_len(sctx->nonTensorsInputs); ++i) {
74-
RedisModule_FreeString(ctx, sctx->nonTensorsInputs[i]);
73+
RedisModule_FreeString(NULL, sctx->nonTensorsInputs[i]);
7574
}
76-
RedisModule_FreeThreadSafeContext(ctx);
7775

7876
array_free(sctx->inputs);
7977
array_free(sctx->outputs);

src/execution/execution_contexts/scriptRun_ctx.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,16 @@ int RAI_ScriptRunAsync(RAI_ScriptRunCtx *sctx, RAI_OnFinishCB ScriptAsyncFinish,
115115
TorchScriptFunctionArgumentType *RAI_ScriptRunCtxGetSignature(RAI_ScriptRunCtx *sctx);
116116

117117
/**
118-
* @brief Returns the length of the input list in the given index
118+
* @brief Returns the length of the input list in the given index.
119119
*
120-
* @param sctx ScriptRunCtx
121-
* @param index Index
122-
* @return size_t length of the input list in the given index
120+
* @param sctx ScriptRunCtx.
121+
* @param index Index of the list out of all the lists given as inputs.
122+
* @return size_t length of the input list in the given index.
123123
*/
124124
size_t RAI_ScriptRunCtxGetInputListLen(RAI_ScriptRunCtx *sctx, size_t index);
125125

126126
/**
127-
* Extract the params for the ScriptCtxRun object from AI.SCRIPTRUN arguments.
127+
* Extract the ternsor parameters for the ScriptCtxRun object from AI.SCRIPTEXECUTE arguments.
128128
*
129129
* @param ctx Context in which Redis modules operate.
130130
* @param inkeys Script input tensors keys, as an array of strings.

0 commit comments

Comments
 (0)