MCPcopy
hub / github.com/psycopg/psycopg / sync

Method sync

psycopg/psycopg/_pipeline.py:50–58  ·  view source on GitHub ↗

Sync the pipeline, send any pending command and receive and process all available results.

(self)

Source from the content-addressed store, hash-verified

48 self._lock = _DummyLock() if _no_lock else conn.lock
49
50 def sync(self) -> None:
51 """Sync the pipeline, send any pending command and receive and process
52 all available results.
53 """
54 try:
55 with self._lock:
56 self._conn.wait(self._sync_gen())
57 except e._NO_TRACEBACK as ex:
58 raise ex.with_traceback(None)
59
60 def __enter__(self) -> Self:
61 with self._lock:

Calls 2

_sync_genMethod · 0.80
waitMethod · 0.45