1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00
Files
go-mixed/locker/readme.md
2024-05-28 04:23:30 +08:00

23 lines
301 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

同步锁
EmptyLocker 空锁
RWLocker, 读写锁
SpinLocker, 旋转锁
锁可以添加一个外部存储成为分布式锁。WithRedis, WithZookeeper
单例锁
资源锁
分布式锁
在锁的基础上添加分布式存储升级为分布式锁
locker.WithRedis()
locker.WithZookeeper()