]> git.ipfire.org Git - thirdparty/xz.git/commit
liblzma: mt dec: Simplify by removing the THR_STOP state
authorLasse Collin <lasse.collin@tukaani.org>
Thu, 3 Apr 2025 11:34:42 +0000 (14:34 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Thu, 3 Apr 2025 11:34:42 +0000 (14:34 +0300)
commitc0c835964dfaeb2513a3c0bdb642105152fe9f34
treee26d764a6d3469b9f75d02a59a0fac41acfaeac5
parent831b55b971cf579ee16a854f177c36b20d3c6999
liblzma: mt dec: Simplify by removing the THR_STOP state

The main thread can directly set THR_IDLE in threads_stop() which is
called when errors are detected. threads_stop() won't return the stopped
threads to the pool or free the memory pointed by thr->in anymore, but
it doesn't matter because the existing workers won't be reused after
an error. The resources will be cleaned up when threads_end() is
called (reinitializing the decoder always calls threads_end()).

Reviewed-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Thanks-to: Sam James <sam@gentoo.org>
src/liblzma/common/stream_decoder_mt.c