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

Add more use of CancellationToken in Async methods. #1468

Merged

Conversation

lukebakken
Copy link
Contributor

Related to #1420

@lukebakken lukebakken self-assigned this Jan 10, 2024
@lukebakken lukebakken added this to the 7.0.0 milestone Jan 10, 2024
@lukebakken lukebakken force-pushed the rabbitmq-dotnet-client-1420-cancellationtoken-review branch 2 times, most recently from 5421696 to 84cd1cf Compare January 26, 2024 18:00
@lukebakken lukebakken marked this pull request as ready for review January 26, 2024 18:00
@lukebakken lukebakken marked this pull request as draft January 28, 2024 02:55
@lukebakken lukebakken force-pushed the rabbitmq-dotnet-client-1420-cancellationtoken-review branch from ca7854e to 960fd68 Compare February 1, 2024 00:36
@lukebakken lukebakken marked this pull request as ready for review February 1, 2024 15:16
* Correctly dispose of `CancellationTokenSource` and `CancellationTokenRegistration` instances.
* Refactor `Connection.Close` to use async internally.
* Fix test by adding `WaitAsync` that also takes a timeout.
* Add `ConfigureAwait` where it was missing.
* Always create `CancellationTokenSource` for recovery, and dispose it.
* Modify `WaitAsync` `Task` extension to see if `Task` has already completed.
* Don't swallow exceptions unless `abort` is specified.
* Add `TaskCreationOptions` to two spots.
* Add `SetSessionClosingAsync`
* Use `CancellationToken` to stop receieve loop.
* Pass the main loop `CancellationToken` into `HardProtocolExceptionHandlerAsync`.
* Pass `CancellationToken` to `IFrameHandler.CloseAsync`.
* Remove remaining usage of `ThreadPool`
@lukebakken lukebakken force-pushed the rabbitmq-dotnet-client-1420-cancellationtoken-review branch from 960fd68 to 035bb90 Compare February 1, 2024 16:22
@lukebakken lukebakken merged commit 1fa0562 into main Feb 1, 2024
11 checks passed
@lukebakken lukebakken deleted the rabbitmq-dotnet-client-1420-cancellationtoken-review branch February 1, 2024 17:11
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.

1 participant