Skip to content

mis-detects curio as asyncio when running in curio in asyncio.to_thread (py3.9) #20

Description

@graingert
import curio
import sniffio
import asyncio

async def current_framework():
    return sniffio.current_async_library()


async def amain():
    sniffio.current_async_library()
    return await asyncio.to_thread(curio.run, current_framework)


print(asyncio.run(amain()))  # prints asyncio - should print curio

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions