Posted in

Golang竞态检测失效真相:-race flag无法覆盖的4类非共享内存竞态(channel闭包、sync.Pool误用、atomic.LoadUintptr误判)

第一章:Golang竞态检测失效 … Golang竞态检测失效真相:-race flag无法覆盖的4类非共享内存竞态(channel闭包、sync.Pool误用、atomic.LoadUintptr误判)Read more

Posted in

Go map底层无锁设计真相:不是完全无锁!runtime.mapaccess1中2处atomic.Loaduintptr + 1处atomic.AddUintptr构成轻量同步协议

第一章:Go map底层无锁设计 … Go map底层无锁设计真相:不是完全无锁!runtime.mapaccess1中2处atomic.Loaduintptr + 1处atomic.AddUintptr构成轻量同步协议Read more

Posted in

map迭代器(hiter)生命周期管理揭秘:for range如何避免重复初始化?runtime.mapiterinit中3次atomic.Loaduintptr深意

第一章:map迭代器(hiter … map迭代器(hiter)生命周期管理揭秘:for range如何避免重复初始化?runtime.mapiterinit中3次atomic.Loaduintptr深意Read more