MCPcopy
hub / github.com/psycopg/psycopg / worker

Function worker

tests/test_concurrency.py:23–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21@pytest.mark.slow
22def test_concurrent_execution(conn_cls, dsn):
23 def worker():
24 cnn = conn_cls.connect(dsn)
25 cur = cnn.cursor()
26 cur.execute("select pg_sleep(0.5)")
27 cur.close()
28 cnn.close()
29
30 t1 = threading.Thread(target=worker)
31 t2 = threading.Thread(target=worker)

Callers

nothing calls this directly

Calls 7

connectMethod · 0.45
cursorMethod · 0.45
executeMethod · 0.45
closeMethod · 0.45
transactionMethod · 0.45
setMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected