jjzjj

ActiveConn

全部标签

go http.Request.Conn.ActiveConn是一个map,那么会不会有并发map的问题呢?

去http.Request.Context.ActiveConn是一个map,会不会有并发map问题?如果有很多连接,我打印包含ActiveConn(map)的request.Context,会不会有并发读写map的问题?packagemainimport("fmt""net/http")funcmain(){http.HandleFunc("/",func(whttp.ResponseWriter,r*http.Request){fmt.Fprintf(w,"r.ctx:%#v,%+v",r.Context(),r.Context())})http.ListenAndServe(":