pool icon indicating copy to clipboard operation
pool copied to clipboard

加锁吗?

Open lzb200244 opened this issue 1 year ago • 1 comments


p.RLock()
current := atomic.LoadInt32(&p.current)
p.RUnlock()

请问一下,使用了atomic为什么还需要加锁?加锁和原子化是不是其中有一个多余了呢?

lzb200244 avatar Nov 29 '23 03:11 lzb200244