I'm trying to use Redis' set
command to implement a simplest distributed lock component, but I can't find any exact basis about atomicity through the official document, is Redis' SET key value [EX seconds] [PX milliseconds] [NX|XX]
command an atomic operation?
相关问题
- Getting Redis Master address from Sentinel C#
- Configuring Redis to play nice with AppHarbor
- Reliability of file locking on network files
- Why does the lock insure that the underlying monit
- Why do we need Redis for running CKAN?
Yes. The core is single threaded, so nothing will run until the
SET
has completed; that makesSET {key} {value} EX {expiry} NX
ideal for simple locking.