Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ To create a connection pool, use the
The resulting :class:`Pool <asyncpg.pool.Pool>` object can then be used
to borrow connections from the pool.

When using ``async with pool.acquire() as connection``, the connection is
released back to the pool automatically when the context exits. There is no
need to close the borrowed connection explicitly.

Below is an example of how **asyncpg** can be used to implement a simple
Web service that computes the requested power of two.

Expand Down