1
0
mirror of https://github.com/lz4/lz4.git synced 2026-10-24 01:48:57 +03:00
Files
lz4/programs/threadpool.c
Yann Collet aa787570e6 Windows CI: test lz4 -l on an empty file, NEWS for #1740
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.
2026-10-17 09:01:28 -07:00

13 KiB