Prefer async methods on connection numbers to their property analogues in the Pool class
#123
Closed
stankudrow
started this conversation in
Ideas
Replies: 1 comment
-
|
Inspired by the PR #122 which is closed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the
Poolclass has the following properties:The first two are constants and can stay as properties, but the last two guys are dynamic in nature, so they are subjected to possible data races. To ensure the coroutine safety, these properties are better to get deprecated in favour of analogous
get_async methods.For instance:
It may seem strange at the first glance, but the benefits of coroutine-safe methods are essential. So, the
acquired_connectionsandfree_connectionscan be deprecated in the async v0.2.6 in order to be removed in the v0.2.7.@long2ice , what do you think?
Beta Was this translation helpful? Give feedback.
All reactions