You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connector/NET exposes a MySqlConnection.CloseAsync API (albeit implemented synchronously).
We could add the same API for clients who want to close the connection asynchronously; however note that in most cases this is just returning the connection to the pool, which is a synchronous operation (so CloseAsync would just add overhead).
Since it isn't an asynchronous operation, is not part of ADO.NET DbConnection's interface, and is needed only for backwards compatibility with Connector/NET, I think CloseAsync is better to be implemented as an extension, maybe even in a separate package.
Activity
sazarubin commentedon Jun 3, 2018
Since it isn't an asynchronous operation, is not part of ADO.NET
DbConnection's interface, and is needed only for backwards compatibility with Connector/NET, I thinkCloseAsyncis better to be implemented as an extension, maybe even in a separate package.bgrainger commentedon May 23, 2019
This can mostly be avoided by not implementing it as an
asyncmethod and instead just returningTask.CompletedTask.Implement CloseAsync. Fixes #467
bgrainger commentedon Sep 24, 2019
Added in 0.57.0.