cpr icon indicating copy to clipboard operation
cpr copied to clipboard

Force the end of the thread pool

Open 204065248 opened this issue 2 years ago • 1 comments

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

204065248 avatar Dec 04 '23 10:12 204065248

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 avatar Dec 05 '23 15:12 COM8