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
Open

Force the end of the thread pool #988

204065248 opened this issue Dec 4, 2023 · 1 comment

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants