[PATCH] D93726: [clangd] Use atomics instead of locks to track periodic memory trimming

Quentin Chateau via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 22 13:12:28 PST 2020


qchateau accepted this revision.
qchateau added a comment.
This revision is now accepted and ready to land.

LGTM

Small nits:

- `operator()` is not `const` but `Next` is `mutable`, seems to me you intended to have `operator()` as `const`
- memory orders for the atomic operations can probably be downgraded to `std::memory_order_acquire`/`std::memory_order_acq_rel`. I think the first load can even be `relaxed` but that I'm always careful with these


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93726/new/

https://reviews.llvm.org/D93726



More information about the cfe-commits mailing list