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

Method worker

tests/test_pool.py:52–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 min_size=5, max_size=10)
51
52 async def worker():
53 con = await pool.acquire()
54 self.assertEqual(await con.fetchval('SELECT 1'), 1)
55 await pool.release(con)
56
57 tasks = [worker() for _ in range(n)]
58 await asyncio.gather(*tasks)

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected