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:538–540 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
536
max_queries=1)
as
pool:
537
538
async
def
sleep_and_release():
539
async
with
pool.acquire()
as
con:
540
await con.execute(
'SELECT pg_sleep(1)'
)
541
542
asyncio.ensure_future(sleep_and_release())
543
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