locking - Is Redis' set command an atomic operation? -


i'm trying use redis' set command implement simplest distributed lock component, can't find exact basis atomicity through official document, redis' set key value [ex seconds] [px milliseconds] [nx|xx] command atomic operation?

yes. core single threaded, nothing run until set has completed; makes set {key} {value} ex {expiry} nx ideal simple locking.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -