Closed slact closed 13 years ago
Thanks Leo! I'm going to review your code on the weekend when I'll have a bit more of free time.
Proper support for CAS is missing in redis-lua 2.0 because I wanted to release ASAP a stable version that was compatible with Redis 2.0 (and I was already terribly late for that), but now that Redis 2.2 is very near to hit the first RC stage I guess it's indeed a feature that should be added for a v2.0.1 of the library.
I'm closing this pull request since support for CAS transactions is almost finalized and it will soon be merged into master.
Thanks Leo!
Hey, I noticed that your transaction abstraction doesn't let you do check-and-set operations so i added a client_prototype.check_and_set function, using a coroutine or two callback blocks. So you could do something like:
I'd tried other abstractions, but a coroutine seemed to make good sense. Just in case though, you could also do:
What do you think?