Type the inter-loop chans

aio_abandons
Tyler Goodlet 2024-12-09 17:37:27 -05:00
parent 54699d7a0b
commit a2659069c5
1 changed files with 4 additions and 4 deletions

View File

@ -245,14 +245,14 @@ def _run_asyncio_task(
result != orig and result != orig and
aio_err is None and aio_err is None and
# in the ``open_channel_from()`` case we don't # in the `open_channel_from()` case we don't
# relay through the "return value". # relay through the "return value".
not provide_channels not provide_channels
): ):
to_trio.send_nowait(result) to_trio.send_nowait(result)
finally: finally:
# if the task was spawned using ``open_channel_from()`` # if the task was spawned using `open_channel_from()`
# then we close the channels on exit. # then we close the channels on exit.
if provide_channels: if provide_channels:
# only close the sender side which will relay # only close the sender side which will relay
@ -500,7 +500,7 @@ async def run_task(
''' '''
# simple async func # simple async func
chan = _run_asyncio_task( chan: LinkedTaskChannel = _run_asyncio_task(
func, func,
qsize=1, qsize=1,
**kwargs, **kwargs,
@ -530,7 +530,7 @@ async def open_channel_from(
spawned ``asyncio`` task and ``trio``. spawned ``asyncio`` task and ``trio``.
''' '''
chan = _run_asyncio_task( chan: LinkedTaskChannel = _run_asyncio_task(
target, target,
qsize=2**8, qsize=2**8,
provide_channels=True, provide_channels=True,