MCPcopy
hub / github.com/MagicStack/asyncpg / worker

Method worker

tests/test_pool.py:1086–1089  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1084 min_size=5, max_size=10)
1085
1086 async def worker():
1087 con = await pool.acquire()
1088 self.assertEqual(await con.fetchval('SELECT 1'), 1)
1089 await pool.release(con)
1090
1091 tasks = [worker() for _ in range(n)]
1092 await asyncio.gather(*tasks)

Callers

nothing calls this directly

Calls 3

acquireMethod · 0.45
fetchvalMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected