1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00

readme: warn that code in callbacks to commands in a multi are not atomic

This commit is contained in:
David Trejo
2012-04-27 21:07:59 -04:00
parent 710a705be2
commit 0a732b8c0e

View File

@@ -376,6 +376,8 @@ Redis. The interface in `node_redis` is to return an individual `Multi` object
.scard("bigset") .scard("bigset")
.smembers("bigset") .smembers("bigset")
.keys("*", function (err, replies) { .keys("*", function (err, replies) {
// NOTE: code in this callback is NOT atomic
// this only happens after the the .exec call finishes.
client.mget(replies, redis.print); client.mget(replies, redis.print);
}) })
.dbsize() .dbsize()