ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
Concurrent Map === 适用于读写都很频繁的情况 ![](https://box.kancloud.cn/d499f3c5cf6b239af0a7e75f39d98a9a_551x298.png) 吧大的锁拆分成小的锁,降低了冲突的概率 ### 第三方库: [https://github.com/orcaman/concurrent-map](https://github.com/orcaman/concurrent-map) [https://github.com/fanliao/go-concurrentMap](https://github.com/fanliao/go-concurrentMap) 感觉都有点.... ### 锁的性能影响 - 减少锁影响的范围 - 减少发生锁冲突的概率 - sync.Map - ConcurrentMap - 避免锁的使用