]> git.ipfire.org Git - thirdparty/zstd.git/commit
Fix AsyncIO reading seed queueing (#3940)
authorYonatan Komornik <11005061+yoniko@users.noreply.github.com>
Mon, 11 Mar 2024 23:28:32 +0000 (16:28 -0700)
committerGitHub <noreply@github.com>
Mon, 11 Mar 2024 23:28:32 +0000 (16:28 -0700)
commitedab9eed66f02c7c3c8be849f22f20ffbd04976b
tree463d3cf3a074218b652909393f39eeeaee4631af
parenta4db1459004eade5148c84fc81062e022f884573
Fix AsyncIO reading seed queueing (#3940)

Fixes a bug in AsyncIO where we queue reads after opening a file so our queue will always be saturated (or as saturated as possible).
Previous code was looping up to `availableJobsCount` not realizing `availableJobsCount` was also decreasing in each iteration, so instead of queueing 10 jobs we'd queue 5 (and instead of 2 we'd queue 1).
This PR fixes the loop to queue as long as `availableJobsCount` is not 0.
programs/fileio_asyncio.c