-
Notifications
You must be signed in to change notification settings - Fork 12
Description
The question:
Is there a way to change the number of threads used after initialization?
The story behind the question:
Let's assume I have a program that reads from a large input gz file.
The decompressed content could be processed in parallel.
Using the standard zlib, parallelization is limited by the decompression bandwidth.
Using rapidgzip, I could improve decompression bandwidth, but the problem is how I assign threads.
I would like to adjust the number of threads the decompressor uses dynamically.
In this scenario, I would assign all threads for decompression at the beginning, and then I would start using some of them to process the decompressed data. Depending on the amount of the data already decompressed, I would dynamically re-assign threads to the producer (decompressor) and consumer.