MCPcopy
hub / github.com/python-trio/trio / synchronize

Function synchronize

src/trio/_core/_tests/test_guest_mode.py:241–245  ·  view source on GitHub ↗

Wait for all in_host() calls issued so far to complete.

()

Source from the content-addressed store, hash-verified

239
240 async def trio_main(in_host: InHost) -> str:
241 async def synchronize() -> None:
242 """Wait for all in_host() calls issued so far to complete."""
243 evt = trio.Event()
244 in_host(evt.set)
245 await evt.wait()
246
247 # Host and guest have separate sniffio_library contexts
248 in_host(partial(setattr, sniffio_library, "name", "nullio"))

Callers 1

trio_mainFunction · 0.85

Calls 1

waitMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…