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
api: Clarify expectations regarding ServerCall#close #7580
api: Clarify expectations regarding ServerCall#close #7580
Conversation
@@ -163,6 +163,11 @@ public boolean isReady() { | |||
* <p>Since {@link Metadata} is not thread-safe, the caller must not access (read or write) {@code | |||
* trailers} after this point. | |||
* | |||
* <p>Implementation note regarding ForwardingServerCalls: This method is called after the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd much rather not call out ForwardingServerCalls. And saying something like "this method won't be called" isn't right either as it is up to the application whether it is called or not.
I think we should have some text to emphasize that the close call is not the point where the RPC is complete. Instead, that is onComplete/onCancel. We can probably add that to the paragraph above. We can also say that close is not necessary to be called if the RPC is cancelled as the call is already dead.
Oh, you closed. Was that an accident? This doesn't seem like something bad to improve. |
I closed this PR because the original purpose of the PR which is the second sentence is not true (see linked issue). I'll reopen it with a changed description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ST-DDT, thank you! I appreciate these javadoc improvements. |
Fixes #7571