Wait for all in_host() calls issued so far to complete.
()
| 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")) |