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
-
Currently the
Pool
class 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_connections
andfree_connections
can 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