]> git.ipfire.org Git - thirdparty/xz.git/commit
xz: Fix semi-busy-waiting in xz --flush-timeout.
authorLasse Collin <lasse.collin@tukaani.org>
Sun, 26 Jan 2020 12:13:42 +0000 (14:13 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sun, 26 Jan 2020 12:13:42 +0000 (14:13 +0200)
commit5a49e081a098455bcdbd95cefb90e9b18780fe58
tree323ddab03fabed2e00828eaaed8a29598eb06887
parentdcca70fe9fa3c4bec56cf9c79e966166c9a9cf6a
xz: Fix semi-busy-waiting in xz --flush-timeout.

When input blocked, xz --flush-timeout=1 would wake up every
millisecond and initiate flushing which would have nothing to
flush and thus would just waste CPU time. The fix disables the
timeout when no input has been seen since the previous flush.
src/xz/coder.c
src/xz/file_io.c
src/xz/file_io.h