summaryrefslogtreecommitdiff
path: root/include/sqfs/block_processor.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-10 13:08:26 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-10 13:08:26 +0200
commit1fe6b2aa4158516f9c6cf5751cc68aafef1af620 (patch)
tree2047e37b6101f35c5dd55c59b885be22fe570407 /include/sqfs/block_processor.h
parent49c2c4a8c8a8eb32a7d5fdbf4b1eba24bb23efe7 (diff)
Make the thread pool queue backlog user configurable
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs/block_processor.h')
-rw-r--r--include/sqfs/block_processor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sqfs/block_processor.h b/include/sqfs/block_processor.h
index ed38be6..1032a35 100644
--- a/include/sqfs/block_processor.h
+++ b/include/sqfs/block_processor.h
@@ -161,6 +161,9 @@ extern "C" {
* the deep copy function of the compressor is used to create
* several instances that don't interfere with each other.
* @param num_workers The number of worker threads to create.
+ * @param max_backlog The maximum number of blocks currently in flight. When
+ * trying to add more, enqueueing blocks until the in-flight
+ * block count drops below the threshold.
* @param user An arbitrary user pointer to pass to the block callback.
* @param callback A function to call for each finished data block.
*
@@ -172,6 +175,7 @@ SQFS_API
sqfs_block_processor_t *sqfs_block_processor_create(size_t max_block_size,
sqfs_compressor_t *cmp,
unsigned int num_workers,
+ size_t max_backlog,
void *user,
sqfs_block_cb callback);