Results 4 comments of liyebing

reactor-netty version more than 1.xx have the same problem. but 0.9.xx is not

with reactor-netty version more than 1.xx , if qps bigger ,and trigger the "reactor.netty.channel.AbortedException: Connection has been closed " @violetagg

不知道为啥,我在本机初始化数据后,执行单协程下100亿次读操作,耗时时间对比如下 RLocked map time: 5m12.799166666s map加读写锁,用读锁 unLocked map time: 5m7.516323292s map无锁 Locked map time: 5m19.848126958s map加写锁 sync.Map time: 6m49.719245417s sync.Map 测下来sync.Map 性能最差。后来又做了1000亿次的读操作,sync.Map花了1小时16分钟,只有sync.Map超过1小时了,其余都没操过1小时,大跌眼镜。。。。不知道哪里做的不对,请大佬指点

接上面的问题,测试代码如下: import ( "fmt" "math/rand" "sync" "time" ) // SyncMapReader 用于读取 sync.Map type SyncMapReader struct { syncMap sync.Map } func (sm *SyncMapReader) Read(key int) interface{} { val, _ := sm.syncMap.Load(key)...