Skip to content

New API: grpc.CancelClientStream(ClientStream) #1933

@dfawley

Description

@dfawley

The only way to cancel a stream before the deadline expires today is via context cancelation. This process is asynchronous, but it is often desirable to have a synchronous way of cancelling an RPC such that users can be sure the stream has been closed before regaining control.

Implementing this feature would be done by:

  1. Calling clientStream.cancel() (as the user would do)
  2. Blocking until clientStream.finish() has finished (it will be called via the goroutine monitoring this context).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Type: FeatureNew features or improvements in behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions