golang/go

net: clarify net.Conn concurrency requirement

Open

#27,203 创建于 2018年8月24日

在 GitHub 查看
 (17 评论) (2 反应) (0 负责人)Go (19,008 fork)batch import
DocumentationNeedsInvestigationTestinghelp wanted

仓库指标

Star
 (133,883 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

From the net.Conn docs:

Multiple goroutines may invoke methods on a Conn simultaneously.

I'm not sure if this should be interpreted as different methods can be called concurrently, or as the same method can be called concurrently.

I suspect, judging from x/net/nettest's ConcurrentMethods and from most implementations, that it's the former. If so, should we change the docs to include "may invoke distinct methods"?

贡献者指南