Skip to content

StopIteration in a generator in a thread hanging on asyncio #112182

Description

@NewUserHa

Bug report

Bug description:

import asyncio

def a():
    raise StopIteration

try:
    await asyncio.to_thread(a)
except:
    print(3.12.0)

other cases: agronholm/anyio#477

CPython versions tested on:

3.11, 3.12

Operating systems tested on:

Windows

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixestopic-asynciotype-bugAn unexpected behavior, bug, or error

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions