diff options
| author | Alexander Richardson <alexrichardson@google.com> | 2023-09-18 09:08:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-18 12:08:24 -0400 |
| commit | 14882d6b7440e797d8d60cb1f8207fe332cae033 (patch) | |
| tree | 05cb0bf5cfb688b763cec6da21330f1d801abcde /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | |
| parent | 6a45339bac4a44728cb9d1866c7e4d9a8f18e93d (diff) | |
| download | llvm-14882d6b7440e797d8d60cb1f8207fe332cae033.zip llvm-14882d6b7440e797d8d60cb1f8207fe332cae033.tar.gz llvm-14882d6b7440e797d8d60cb1f8207fe332cae033.tar.bz2 | |
[libc++][lit] Atomically update the persistent cache (#66538)
When running multiple shards in parallel, one shard might write to the
cache while another one is reading this cache. Instead of updating the
file in place, write to a temporary file and swap the cache file using
os.replace(). This is an atomic operation and means shards will either
see the old state or the new one.
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions
