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

Registering IAsyncDisposable implementations throws an InvalidOperationException #6658

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

danielmarbach
Copy link
Contributor

@danielmarbach danielmarbach commented Jan 9, 2023

Fixes #6659

Backport of #6650 to release-8.0

…sposed (#6650)

* AcceptanceTest to verify scoped async disposable support

* use CreateAsyncScope

* Add Assert

* Extend test for singletons

* Owned builder should be disposed using async disposable

* Async dispose token registration

* Dispose stopping token source

* Fix leaking token source

* Enable nullable in RunningEndpointInstance to indicate case when builder is null

* Make the externally managed mode more visible in the code

* Coverage of externally and internally managed mode

* Rename tests

Co-authored-by: Simon <simon.cropp@gmail.com>
Copy link
Member

@ramonsmits ramonsmits left a comment

Choose a reason for hiding this comment

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

LGTM

@danielmarbach danielmarbach merged commit 6a886b7 into release-8.0 Jan 12, 2023
@danielmarbach danielmarbach deleted the async-disposable-backport branch January 12, 2023 08:57
@danielmarbach danielmarbach added this to the 8.0.3 milestone Jan 12, 2023
@danielmarbach danielmarbach changed the title Use async scope to make sure scoped IAsyncDisposable instances get disposed Registering IAsyncDisposable implementations throws an InvalidOperationException Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants