mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Modules: use RedisModule_AbortBlock() in the example.
This commit is contained in:
parent
95c17c0cb2
commit
a3b3ca7c21
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user