Skip to content

Allow re-entry into the event loop using tokens #256

Description

@agronholm

Trio allows using trio.from_thread.run and trio.from_thread.run_sync to be called from unrelated threads as long as a token (from trio.low_level.current.token) is provided.

On asyncio this token could be the event loop object itself, or another object that wraps it.

This change would likely allow us to remove the __new__() hack from BlockingPortal.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions