Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Aug 15, 2024

When an StopIteration raises into asyncio.Future, this will cause
a thread to hang. This commit address this by not raising an exception
and silently transforming the StopIteration with a RuntimeError,
which the caller can reconstruct from fut.exception().__cause__
(cherry picked from commit 4826d52)

Co-authored-by: Jamie Phan [email protected]

…ythonGH-113220)

When an `StopIteration` raises into `asyncio.Future`, this will cause
a thread to hang. This commit address this by not raising an exception
and silently transforming the `StopIteration` with a `RuntimeError`,
which the caller can reconstruct from `fut.exception().__cause__`
(cherry picked from commit 4826d52)

Co-authored-by: Jamie Phan <[email protected]>
@serhiy-storchaka serhiy-storchaka merged commit 41090b7 into python:3.12 Aug 15, 2024
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 this pull request may close these issues.

3 participants