redlock-rb icon indicating copy to clipboard operation
redlock-rb copied to clipboard

Could I obtain multi resource by one lock?

Open sunkuo opened this issue 8 years ago • 1 comments

Hey, Antirez! Would it be better if i can obtain multi resource by one lock . Think about this use case : In a shopping application , when a user place order with multi skus and count, it is a good idea to use Redlock to lock the skus and judge is there enough inventory to sell.

sunkuo avatar Apr 24 '17 06:04 sunkuo

I think it is realizable with the command Msetnx and del

sunkuo avatar Apr 24 '17 06:04 sunkuo