-
Notifications
You must be signed in to change notification settings - Fork 1.2k
internal/socket: support MSG_DONTWAIT #108
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
Conversation
This PR (HEAD: d432032) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/net/+/333469 to see it. Tip: You can toggle comments from me using the |
Message from Ian Lance Taylor: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/333469. |
This PR (HEAD: 4022e9b) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/net/+/333469 to see it. Tip: You can toggle comments from me using the |
Message from Matthias Frei: Patch Set 1: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/333469. |
Message from Ian Lance Taylor: Patch Set 2: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/333469. |
Message from Go Bot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/333469. |
Message from Go Bot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/333469. |
Message from Go Bot: Patch Set 2: TryBot-Result-1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/333469. |
Message from Ian Lance Taylor: Patch Set 2: Code-Review+2 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/333469. |
Message from Damien Neil: Patch Set 2: Code-Review+1 Trust+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/333469. |
Message from Damien Neil: Patch Set 2: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/333469. |
Explicitly handle MSG_DONTWAIT in read and send calls on platforms where this is defined, to get the per-call non-blocking behavior as would be expected when calling readmsg/sendmsg in C. When MSG_DONTWAIT is set, we always return true from the function passed to syscall.RawConn.Read/Write, to avoid entering the polling state. Fixes golang/go#46891 Change-Id: I4809577477554db1c45b6f4825a03d98208199d7 GitHub-Last-Rev: 4022e9b GitHub-Pull-Request: #108 Reviewed-on: https://go-review.googlesource.com/c/net/+/333469 Run-TryBot: Ian Lance Taylor <[email protected]> Run-TryBot: Damien Neil <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Damien Neil <[email protected]> Trust: Damien Neil <[email protected]>
This PR is being closed because golang.org/cl/333469 has been merged. |
Explicitly handle MSG_DONTWAIT in read and send calls on platforms where this is defined, to get the per-call non-blocking behavior as would be expected when calling readmsg/sendmsg in C.
When MSG_DONTWAIT is set, we always return true from the function passed to syscall.RawConn.Read/Write, to avoid entering the polling state.
Fixes golang/go#46891