forked from goodboy/tractor
38d03858d7
This fixes an previously undetected bug where if an `.open_channel_from()` spawned task errored the error would not be propagated to the `trio` side and instead would fail silently with a console log error. What was most odd is that it only seems easy to trigger when you put a slight task sleep before the error is raised (:eyeroll:). This patch adds a few things to address this and just in general improve iter-task lifetime syncing: - add `LinkedTaskChannel._trio_exited: bool` a flag set from the `trio` side when the channel block exits. - add a `wait_on_aio_task: bool` flag to `translate_aio_errors` which toggles whether to wait the `asyncio` task termination event on exit. - cancel the `asyncio` task if the trio side has ended, when `._trio_exited == True`. - always close the `trio` mem channel when the task exits such that the `asyncio` side can error on any next `.send()` call. |
||
---|---|---|
.. | ||
conftest.py | ||
test_2way.py | ||
test_advanced_streaming.py | ||
test_cancellation.py | ||
test_child_manages_service_nursery.py | ||
test_clustering.py | ||
test_context_stream_semantics.py | ||
test_debugger.py | ||
test_discovery.py | ||
test_docs_examples.py | ||
test_infected_asyncio.py | ||
test_local.py | ||
test_multi_program.py | ||
test_pubsub.py | ||
test_resource_cache.py | ||
test_rpc.py | ||
test_spawning.py | ||
test_streaming.py | ||
test_task_broadcasting.py | ||
test_trioisms.py |