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:
Yann Collet
2018-06-19 18:07:18 -07:00
parent 066fbbfe1c
commit 166901dc72
3 changed files with 1 additions and 6 deletions
+1 -1
View File
@@ -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);