Commit a3b3ca7c authored by antirez's avatar antirez
Browse files

Modules: use RedisModule_AbortBlock() in the example.

parent 95c17c0c
...@@ -99,7 +99,7 @@ int HelloBlock_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int a ...@@ -99,7 +99,7 @@ int HelloBlock_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int a
targ[1] = (void*)(unsigned long) delay; targ[1] = (void*)(unsigned long) delay;
if (pthread_create(&tid,NULL,HelloBlock_ThreadMain,targ) != 0) { if (pthread_create(&tid,NULL,HelloBlock_ThreadMain,targ) != 0) {
/* RedisModule_BlockedClientAbort(bc); */ RedisModule_AbortBlock(bc);
return RedisModule_ReplyWithError(ctx,"-ERR Can't start thread"); return RedisModule_ReplyWithError(ctx,"-ERR Can't start thread");
} }
return REDISMODULE_OK; return REDISMODULE_OK;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment