]> git.ipfire.org Git - thirdparty/zstd.git/commit
improved ZSTD_createCCtxPool() cancellation
authorYann Collet <cyan@fb.com>
Wed, 11 Jan 2017 14:44:26 +0000 (15:44 +0100)
committerYann Collet <cyan@fb.com>
Wed, 11 Jan 2017 14:44:26 +0000 (15:44 +0100)
commit8ce1cc2bec798fb959dcc403b462eebf3a985119
tree42cca9a84e173110ca0128278c7c61ff2fb74025
parent47557ba2b259828960598e1040af3f1d71222cd3
improved ZSTD_createCCtxPool() cancellation

use ZSTD_freeCCtxPool() to release the partially created pool.
avoids to duplicate logic.

Also : identified a new difficult corner case :
when freeing the Pool, all CCtx should be previously released back to the pool.
Otherwise, it means some CCtx are still in use.
There is currently no clear policy on what to do in such a case.
Note : it's supposed to never happen.
Since pool creation/usage is static, it has no external user,
which limits risks.
lib/compress/zstdmt_compress.c