Skip to content

Latest commit

 

History

History
5 lines (5 loc) · 304 Bytes

README.md

File metadata and controls

5 lines (5 loc) · 304 Bytes

redis-lock compare to other distributed lock, it has the following advantages

  1. introduce redis PSUBSCRIBE, not need to cycle call redis, to acquire the lock has been unlock
  2. add the local memory lock to decrease redis qps
  3. add AddExpire func, in case task is not finished, and the lock is invalid.