forked from goodboy/tractor
Emphasize `asyncio` only with sleeps
parent
1fdcaf36f3
commit
73d252e09e
|
@ -347,6 +347,7 @@ Check out our experimental system for `guest-mode`_ controlled
|
||||||
while True:
|
while True:
|
||||||
# echo the msg back
|
# echo the msg back
|
||||||
to_trio.send_nowait(await from_trio.get())
|
to_trio.send_nowait(await from_trio.get())
|
||||||
|
await asyncio.sleep(0)
|
||||||
|
|
||||||
|
|
||||||
@tractor.context
|
@tractor.context
|
||||||
|
|
|
@ -25,6 +25,7 @@ async def aio_echo_server(
|
||||||
while True:
|
while True:
|
||||||
# echo the msg back
|
# echo the msg back
|
||||||
to_trio.send_nowait(await from_trio.get())
|
to_trio.send_nowait(await from_trio.get())
|
||||||
|
await asyncio.sleep(0)
|
||||||
|
|
||||||
|
|
||||||
@tractor.context
|
@tractor.context
|
||||||
|
|
Loading…
Reference in New Issue