Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task exception was never retrieved warning #71

Closed
cstruct opened this issue Apr 6, 2021 · 3 comments · Fixed by #72
Closed

Task exception was never retrieved warning #71

cstruct opened this issue Apr 6, 2021 · 3 comments · Fixed by #72

Comments

@cstruct
Copy link
Contributor

cstruct commented Apr 6, 2021

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 and case_2 to emit the warning.

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
@vxgmichel
Copy link
Owner

Good catch! Thanks for the report and the PR :)

vxgmichel added a commit that referenced this issue Apr 6, 2021
@vxgmichel
Copy link
Owner

Merged! @cstruct Do you need a release today?

@cstruct
Copy link
Contributor Author

cstruct commented Apr 6, 2021

No rush, I found this by accident while debugging a segfault at the intersection of aioodbc and aiostream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants