-
Notifications
You must be signed in to change notification settings - Fork 2.1k
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Integrating the library with an external thread pool #4043
Comments
So, you're asking for a feature equivalent to "shared threadPool", exposed at: This would be a new feature indeed. |
Yeah, something that would give control over when to run the tasks (and from which threads) to the user. There's an example of another library doing this here: https://github.com/NVIDIA-Omniverse/PhysX/blob/main/physx/include/task/PxCpuDispatcher.h#L49 It's a C++ library, but a similar pattern could easily be made in C by giving it a function pointer where it should submit new tasks to. |
Is your feature request related to a problem? Please describe.
The library creates its own thread pool when compressing a large file which then contends with the main application that uses it (especially a problem in i.e. a game engine).
Describe the solution you'd like
An API to set a callback for it creating new tasks so you can execute them on your own thread pool when convenient would be nice. Basically fully replacing the pool implementation that comes with the library.
Describe alternatives you've considered
Suppose the alternative would be to not use the multi-threading feature within a single task, since we can already run individual compression tasks when convenient.
The text was updated successfully, but these errors were encountered: