Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ckp95 opened this issue Jun 15, 2023 · 0 comments
Open

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

ckp95 opened this issue Jun 15, 2023 · 0 comments

Comments

@ckp95
Copy link

ckp95 commented Jun 15, 2023

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)?
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

No branches or pull requests

1 participant