Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MagicStack/asyncpg
/ sleep_and_release
Method
sleep_and_release
tests/test_pool.py:479–481 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
477
max_queries=1)
as
pool:
478
479
async
def
sleep_and_release():
480
async
with
pool.acquire()
as
con:
481
await con.execute(
'SELECT pg_sleep(1)'
)
482
483
asyncio.ensure_future(sleep_and_release())
484
await asyncio.sleep(0.5)
Callers
nothing calls this directly
Calls
2
acquire
Method · 0.45
execute
Method · 0.45
Tested by
no test coverage detected