Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the UDP transport locked in the WriteTo function? #39496

Closed
YIDWang opened this issue Jun 10, 2020 · 2 comments
Closed

Why is the UDP transport locked in the WriteTo function? #39496

YIDWang opened this issue Jun 10, 2020 · 2 comments

Comments

@YIDWang
Copy link

YIDWang commented Jun 10, 2020

image
Udp is a bounded transport and does not need to be thread-safe.

@YIDWang
Copy link
Author

YIDWang commented Jun 10, 2020

Can you help me out?

@ianlancetaylor
Copy link
Contributor

Please use text, not images. Images are much harder to read. Thanks.

We don't use the issue tracker for questions. If you want to ask a question, you will get better and faster answers using a forum. See https://golang.org/wiki/Questions.

We lock the FD to ensure that nothing else changes it during the write operation. UDP sockets don't need to be thread safe, but the FD structure is handling other things as well, notably the interaction with the runtime poller.

@golang golang locked and limited conversation to collaborators Jun 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants