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

Best effort multithreading cleanup version of os._exit() #95755

Open
MarcM0 opened this issue Aug 7, 2022 · 0 comments
Open

Best effort multithreading cleanup version of os._exit() #95755

MarcM0 opened this issue Aug 7, 2022 · 0 comments
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@MarcM0
Copy link

MarcM0 commented Aug 7, 2022

Feature or enhancement + Pitch

I am looking for a way to shut down all threads that provides best effort cleanup. I understand that its not possible to guarantee cleanup since one of the threads might hang in the shutdown process. To address this, a timeout argument can be provided. You tell all the threads to cleanup. If they are not done by the timeout, you do what os._exit() does. This would help with error handling where you want to end a program and a clean shutdown is preferred, but not critical.

Previous discussion

Related to an old thread #77268

@MarcM0 MarcM0 added the type-feature A feature request or enhancement label Aug 7, 2022
@MarcM0 MarcM0 changed the title Best effort cleanup version of os._exit() Best effort multithreading cleanup version of os._exit() Aug 7, 2022
@iritkatriel iritkatriel added the stdlib Python modules in the Lib dir label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants