minor doc clarification regarding MT parameters
parent
bdf716bc64
commit
16b353b207
14
lib/zstd.h
14
lib/zstd.h
|
@ -365,16 +365,20 @@ typedef enum {
|
|||
ZSTD_c_dictIDFlag=202, /* When applicable, dictionary's ID is written into frame header (default:1) */
|
||||
|
||||
/* multi-threading parameters */
|
||||
/* These parameters are only useful if multi-threading is enabled (compiled with build macro ZSTD_MULTITHREAD).
|
||||
* They return an error otherwise. */
|
||||
/* These parameters are only active if multi-threading is enabled (compiled with build macro ZSTD_MULTITHREAD).
|
||||
* Otherwise, trying to set any other value than default (0) will be a no-op and return an error.
|
||||
* In a situation where it's unknown if the linked library supports multi-threading or not,
|
||||
* setting ZSTD_c_nbWorkers to any value >= 1 and consulting the return value provides a quick way to check this property.
|
||||
*/
|
||||
ZSTD_c_nbWorkers=400, /* Select how many threads will be spawned to compress in parallel.
|
||||
* When nbWorkers >= 1, triggers asynchronous mode when used with ZSTD_compressStream*() :
|
||||
* When nbWorkers >= 1, triggers asynchronous mode when invoking ZSTD_compressStream*() :
|
||||
* ZSTD_compressStream*() consumes input and flush output if possible, but immediately gives back control to caller,
|
||||
* while compression work is performed in parallel, within worker threads.
|
||||
* while compression is performed in parallel, within worker thread(s).
|
||||
* (note : a strong exception to this rule is when first invocation of ZSTD_compressStream2() sets ZSTD_e_end :
|
||||
* in which case, ZSTD_compressStream2() delegates to ZSTD_compress2(), which is always a blocking call).
|
||||
* More workers improve speed, but also increase memory usage.
|
||||
* Default value is `0`, aka "single-threaded mode" : no worker is spawned, compression is performed inside Caller's thread, all invocations are blocking */
|
||||
* Default value is `0`, aka "single-threaded mode" : no worker is spawned,
|
||||
* compression is performed inside Caller's thread, and all invocations are blocking */
|
||||
ZSTD_c_jobSize=401, /* Size of a compression job. This value is enforced only when nbWorkers >= 1.
|
||||
* Each compression job is completed in parallel, so this value can indirectly impact the nb of active threads.
|
||||
* 0 means default, which is dynamically determined based on compression parameters.
|
||||
|
|
Loading…
Reference in New Issue