ioeric added inline comments.
================ Comment at: clangd/index/Background.cpp:235 + IndexedFileDigests[Path] = FilesToUpdate.lookup(Path); + IndexedSymbols.update(Path, + make_unique<SymbolSlab>(std::move(Syms).build()), ---------------- kadircet wrote: > This call is already thread-safe, no need for it to be under lock. This is for making sure that the update of digest and index data is atomic. If FileSymbols update is not in the lock, we might get the wrong digest for the indexed symbols in corner cases (e.g. T1 updates digest -> T2 updates digest -> T2 update symbols -> T1 updates symbols ). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53433 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits