[all-commits] [llvm/llvm-project] 14882d: [libc++][lit] Atomically update the persistent cac...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Mon Sep 18 09:08:38 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14882d6b7440e797d8d60cb1f8207fe332cae033
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

  Changed paths:
    M libcxx/utils/libcxx/test/dsl.py

  Log Message:
  [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.

More information about the All-commits mailing list