MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / worker

Method worker

tests/test_pool.py:66–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 max_size=10)
65
66 async def worker():
67 con = await pool.acquire()
68 self.assertEqual(await con.fetchval('SELECT 1'), 1)
69 await pool.release(con)
70
71 tasks = [worker() for _ in range(n)]
72 await asyncio.gather(*tasks)

Callers

nothing calls this directly

Calls 8

get_sizeMethod · 0.80
transactionMethod · 0.80
acquireMethod · 0.45
fetchvalMethod · 0.45
releaseMethod · 0.45
executeMethod · 0.45
executemanyMethod · 0.45
get_max_sizeMethod · 0.45

Tested by

no test coverage detected