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

Restore obsolete inheritance-based API #58

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

nblumhardt
Copy link
Member

3.0.0 removed the inheritance-based API; I think this was too hasty - although the corresponding functions/constructors were marked obsolete two years ago, that change didn't make it into a public release until around eight months ago, which hasn't allowed for enough actively-used but slow-moving sinks to migrate.

This change also ensures the wrapped sink is disposed whether the wrapper started or not; the original behavior (not disposing if !_started) is undesirable/unexpected, as far as I can see.

…se() for legacy sinks (using the inheritance API); also now ensures the wrapped sink is disposed whether the wrapper started or not
// override something like `DisposeAsyncCore()`; we just forward to the synchronous
// `Dispose()` method to ensure whatever cleanup they do still occurs.
Dispose(true);
return;
Copy link
Member Author

Choose a reason for hiding this comment

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

This was the original stumbling block that prevented me from enabling IAsyncDispose along with the legacy inheritance-based API.

Copy link
Contributor

@skomis-mm skomis-mm left a comment

Choose a reason for hiding this comment

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

👍

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.

2 participants