Skip to content

Conversation

@glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Jun 16, 2020

Motivation:

Sometimes timeouts are useful, other times deadlines are useful. We
should support both.

Modifications:

  • Add a timeLimit to CallOptions, which is essentially a deadline or
    a timeout. When we start a call we generate a deadline from the time
    limit and forward that timeline through the pipeline and then compute
    a timeout to send to the server.
  • For timeouts, GRPCTimeout has been replaced by TimeAmount, the
    user doesn't care how the timeout is serialized over the wire so it
    makes more sense to use a type which provides better interoperability
    with the rest of the community. Most of the GRPCTimeout code has
    been relocated to shims and marked as deprecated.
  • Shims for deprecating CallOptions(timeout:)

Result:

  • Users can set timeouts or deadlines
  • Better deadline/timeout interoperability with other NIO applications

Motivation:

Sometimes timeouts are useful, other times deadlines are useful. We
should support both.

Modifications:

- Add a `timeLimit` to `CallOptions`, which is essentially a deadline or
  a timeout. When we start a call we generate a deadline from the time
  limit and forward that timeline through the pipeline and then compute
  a timeout to send to the server.
- For timeouts, `GRPCTimeout` has been replaced by `TimeAmount`, the
  user doesn't care how the timeout is serialized over the wire so it
  makes more sense to use a type which provides better interoperability
  with the rest of the community.
- Shims for deprecating `CallOptions(timeout:)`

Result:

- Users can set timeouts or deadlines
- Better deadline/timeout interoperability with other NIO applications
@glbrntt glbrntt added nio ⚠️ semver/major Breaks existing public API. labels Jun 16, 2020
@glbrntt glbrntt requested a review from Lukasa June 16, 2020 15:39
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic patch @glbrntt, I have no notes!

@glbrntt glbrntt added this to the 1.0.0 milestone Jun 16, 2020
@glbrntt
Copy link
Collaborator Author

glbrntt commented Jun 16, 2020

Hmm GitHub says CI is pending but Travis says it's completed and passed. I'll believe Travis here; merging.

@glbrntt glbrntt merged commit 8196439 into grpc:master Jun 16, 2020
@glbrntt glbrntt deleted the gb-deadline branch June 16, 2020 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ semver/major Breaks existing public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants