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

Force the end of the thread pool #988

Open
204065248 opened this issue Dec 4, 2023 · 1 comment · May be fixed by #1168
Open

Force the end of the thread pool #988

204065248 opened this issue Dec 4, 2023 · 1 comment · May be fixed by #1168

Comments

@204065248
Copy link

Is your feature request related to a problem?

Force the end of the thread pool to clean up unexecuted tasks when the program exits

Possible Solution

cpr::clear(); ?

Alternatives

No response

Additional Context

No response

@COM8
Copy link
Member

COM8 commented Dec 5, 2023

The thread pool is not intended by design to be shut down from the outside. It will be cleaned up manually (except the currently running tasks) when exiting the application. This is actually a bug...

This needs to change so we implicitly also close those/cancel those jobs.

For now please make sure you cancel/await all unfinished tasks before shutting down your application.

@COM8 COM8 added Bug 🐛 and removed Feature ✨ labels Dec 5, 2023
@COM8 COM8 added this to the CPR 1.11.0 milestone Dec 5, 2023
@COM8 COM8 modified the milestones: CPR 1.11.0, CPR 1.12.0 Oct 14, 2024
@COM8 COM8 linked a pull request Jan 26, 2025 that will close this issue
@COM8 COM8 linked a pull request Jan 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants