I have a very simple test program in Node.js:
// From 'npm install redis'
var redis = require("redis");
var client = redis.createClient();
client.blpop("mylist", 1, function (err, res) {
if (err) {
throw err;
}
console.log("Result is " + res);
});
If mylist
is an empty list in Redis, this program has no output. I expect it to output "Result is null" after 1 second since the blocking pop operation should timeout, but it does not. What is going on?