mirror of
https://github.com/lz4/lz4.git
synced 2026-10-24 01:48:57 +03:00
On Windows, TPool_jobsCompleted() only waited on an auto-reset event, set when the pending job count drops to 0 : - with no job submitted, the event is never set and the wait never ends. `lz4 -l` on an empty file submits no write job, and decoding the resulting stream (magic number only) submits no decoding job. - ResetEvent() + increment in TPool_submitJob() race with decrement + SetEvent() in a worker : the event can stay set while a job is still pending, so the wait could end before the last write. #1740 checks the pending job count before waiting, and after each wake up. The Windows CI never ran lz4 on files : _test.bat now compresses and decodes an empty file in legacy format.
13 KiB
13 KiB