Skip to content

what's the story on error handling and cancellation? #81

Open
@ckp95

Description

@ckp95

Hi, I came here after watching the Pycon 2023 talk about this. Hope this isn't the wrong place to ask. I want to understand how this approach to concurrency deals with error handling and cancellation.

Let's say I write code using subinterpreters as the concurrency mechanism, rather than threads or processes or async.

  • I start in the "parent" interpreter, and create a subinterpreter. The subinterpreter runs into an unhandled exception. Will it be propagated seamlessly back up to the parent interpreter? How do you catch it?
  • Conversely, can the parent interpreter throw an exception into a sub-interpreter, like how you can .throw into a coroutine? i.e. can subinterpreters be cancelled easily like async tasks (and unlike threads)?

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions