Closed cstruct closed 3 years ago
When using merge and two tasks fail in the same tick a Task exception was never retrieved warning is generated.
Task exception was never retrieved
I would expect both or none of case_1 and case_2 to emit the warning.
case_1
case_2
async def delayed_failing_async_iterator(delay): await asyncio.sleep(delay) raise Exception() yield async def case_1(): async with aiostream.stream.merge( delayed_failing_async_iterator(1), delayed_failing_async_iterator(1), ).stream() as streams: async for item in streams: pass async def case_2(): async with aiostream.stream.merge( delayed_failing_async_iterator(1), delayed_failing_async_iterator(2), ).stream() as streams: async for item in streams: pass
Good catch! Thanks for the report and the PR :)
Merged! @cstruct Do you need a release today?
No rush, I found this by accident while debugging a segfault at the intersection of aioodbc and aiostream.
aioodbc
aiostream
When using merge and two tasks fail in the same tick a
Task exception was never retrieved
warning is generated.I would expect both or none of
case_1
andcase_2
to emit the warning.