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

net/rpc: (*Client).Go is not asynchronous with respect to outbound traffic #13442

tamird opened this issue Dec 1, 2015 · 1 comment


Copy link

tamird commented Dec 1, 2015

In the event of a network partition, net/rpc.(*Client).Go can block, which is surprising given the documented behaviour of this method.

Copy link

meirf commented May 16, 2018

As bdarnell writes in the linked cockroachdb issue:

net/rpc.Client.Go() is asynchronous in that it doesn't wait for a response, but it performs the write synchronously (via Client.send and codec.WriteRequest).

This isn't what someone would expect from the documentation: "Go invokes the function asynchronously." Even in the unlikely case where the authors of net/rpc didn't intend any blocking, making writing non blocking is probably too big of a change/too much of a feature and would violate the net/rpc freeze. Therefore it seems necessary and sufficient to just update the documentation on what is sync and what is async about Client.Go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

3 participants