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

Allow .NET clients to cancel streams started with StreamFrom #33

Closed
wants to merge 1 commit into from
Closed

Allow .NET clients to cancel streams started with StreamFrom #33

wants to merge 1 commit into from

Conversation

kentcb
Copy link

@kentcb kentcb commented Sep 15, 2021

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (fake build or .\build.cmd) on local branch was successful

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

No ability to pass a CancellationToken to HubConnection<...>.StreamFrom in the .NET client.

What is the new behavior?

StreamFrom now accepts an optional CancellationToken, just like other streaming methods.

Does this introduce a breaking change?

  • Yes
  • No (the parameter is optional)

Other information

Fixes #32

@@ -8,7 +8,7 @@ open System.Threading
open System.Threading.Tasks

type internal IHubConnection<'ClientApi,'ClientStreamFromApi,'ClientStreamToApi,'ServerApi,'ServerStreamApi> (hub: HubConnection) =
member _.ConnectionId =
Copy link
Author

Choose a reason for hiding this comment

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

Ugh, so much trailing whitespace removed on account of an extension. Hopefully that's OK (can ignore whitespace in diff settings to remove this noise)

@kentcb kentcb closed this by deleting the head repository Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support cancellation of streams created with StreamFrom in .NET client
1 participant