reduced POOL_resize() restriction
It's not necessary to ensure that no job is ongoing. The pool is only expanded, existing threads are preserved. In case of error, the only option is to return NULL and terminate the thread pool anyway.
This commit is contained in:
@@ -1280,7 +1280,7 @@ size_t ZSTDMT_initCStream_internal(
|
||||
|
||||
/* init */
|
||||
if (params.nbWorkers != mtctx->params.nbWorkers)
|
||||
ZSTDMT_resize(mtctx, params.nbWorkers);
|
||||
CHECK_F( ZSTDMT_resize(mtctx, params.nbWorkers) );
|
||||
|
||||
if (params.jobSize == 0) {
|
||||
params.jobSize = 1U << ZSTDMT_computeTargetJobLog(params);
|
||||
|
||||
Reference in New Issue
Block a user