-
Notifications
You must be signed in to change notification settings - Fork 885
Implement IAsyncDisposable on AdminClient #2470
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation needs some adjustments.
This class owns native resources (see the DisposeResources method), including: |
|
What
AdminClient.Dispose does sync-over-async which impacts the throughput of the thread pool. There is a comment on the method that says
This change fixes that by implementing IAsyncDisposable.
The AdminClient class partially implemented a dispose pattern (
Dispose(bool)
+GC.SuppressFinalize(this)
) but it was missing a finalizer.Anyway, this class doesn't own any native resources so this is not needed.Checklist
IAdminClient