-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Add AsyncNotifyWhenDone #2789
Add AsyncNotifyWhenDone #2789
Conversation
@a11r This is the API we discussed for async server side cancellation monitoring. |
// Async only. Has to be called before the rpc starts. | ||
// Returns the tag in completion queue when the rpc finishes. | ||
// IsCancelled() can then be called to check whether the rpc was cancelled. | ||
void AsyncNotifyWhenDone(void* tag) { async_notify_when_done_tag_ = tag; } |
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.
It's legal to have a NULL tag... we should probably also have a bool have_tag_
field here.
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.
Done.
Sanity is failing (Jenkins, not mine). |
Re-pushed. |
Fixes #2742