]> git.ipfire.org Git - thirdparty/zstd.git/commit
seekable_format: Fix race in parallel_processing
authorDave Vasilevsky <dave@vasilevsky.ca>
Wed, 7 May 2025 04:10:10 +0000 (00:10 -0400)
committerYann Collet <Cyan4973@users.noreply.github.com>
Thu, 8 May 2025 05:01:49 +0000 (22:01 -0700)
commit01c973de8d85392156f4fa1400e0b3c52b50b23e
tree23e1cef48688f0eb83796070280761b7beb8cb5c
parent6fc8455a727f5e21c1ccd5402731b390e2a9076d
seekable_format: Fix race in parallel_processing

There was no memory barrier between writing and reading `done`, which
would allow reordering to cause races. With so little data to handle
after each job completes, we might as well just join.
contrib/seekable_format/examples/parallel_processing.c