From 73d252e09e372f01bdf25da4c6f7a130a026b7ea Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 11 Dec 2021 13:09:36 -0500 Subject: [PATCH] Emphasize `asyncio` only with sleeps --- docs/README.rst | 1 + examples/infected_asyncio_echo_server.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/README.rst b/docs/README.rst index d4f0066..b557e9e 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -347,6 +347,7 @@ Check out our experimental system for `guest-mode`_ controlled while True: # echo the msg back to_trio.send_nowait(await from_trio.get()) + await asyncio.sleep(0) @tractor.context diff --git a/examples/infected_asyncio_echo_server.py b/examples/infected_asyncio_echo_server.py index aeda42c..ee7c45b 100644 --- a/examples/infected_asyncio_echo_server.py +++ b/examples/infected_asyncio_echo_server.py @@ -25,6 +25,7 @@ async def aio_echo_server( while True: # echo the msg back to_trio.send_nowait(await from_trio.get()) + await asyncio.sleep(0) @tractor.context