2
redisGetReply可以有超时时间吗? 我当前的代码是redisGetReply的超时时间
while(redisGetReply(context,&reply) == REDIS_OK) {
//Check for isstopped
if yes return
// consume message
freeReplyObject(reply);
}
目前,如果I信号SIGINT给程序。目前,如果我在redisGetReply中发信号通知SIGINT和此线程。它将等待,直到有来自服务器的消息。
如何使redisGetReply停止某些siganl或有readreply超时?