| 135 | } |
| 136 | |
| 137 | void CommandCtx_ThreadSafeContextUnlock |
| 138 | ( |
| 139 | const CommandCtx *command_ctx |
| 140 | ) { |
| 141 | // release lock only when working with a blocked client |
| 142 | // otherwise we're running on Redis main thread |
| 143 | // no need to release lock |
| 144 | ASSERT(command_ctx != NULL && command_ctx->ctx != NULL); |
| 145 | if(command_ctx->bc) { |
| 146 | RedisModule_ThreadSafeContextUnlock(command_ctx->ctx); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | void CommandCtx_UnblockClient |
| 151 | ( |