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

globals: panic handling #2

Open
kilpatty opened this issue May 22, 2022 · 0 comments
Open

globals: panic handling #2

kilpatty opened this issue May 22, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@kilpatty
Copy link
Contributor

Right now we do not ask for globals to return a result (mainly because they are long running and should run the entirety of the application).

That being said, in the scenario that a global panics, because that global is run in a separate thread, we do not have a way to catch that panic and mitigate it. E.g. consider the scenario where a global panics in a scenario where we want to absolutely restart the entire application. The way that globals are implemented currently makes that impossible.

When we do implement this, it is going to also require adding a config option for managing globals (we could make this an option on a per-global basis, i.e. when we register the global allow for a boolean to be set that determines whether or not a panic'd global causes the application as a whole to panic. We will also want to make sure logging in fixed in the scenario where a global is canceled due to timeout (stop token) vs panics.

@kilpatty kilpatty added enhancement New feature or request good first issue Good for newcomers labels May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant