[PATCH] D43648: [clangd] Debounce streams of updates.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 23 10:25:40 PST 2018
sammccall added inline comments.
================
Comment at: clangd/TUScheduler.cpp:324
+ if (*Deadline)
+ RequestsCV.wait_until(Lock, **Deadline);
+ else
----------------
ilya-biryukov wrote:
> It looks like if we unwrap `Optional<Deadline>` to `Deadline`, we could replace this code with `wait` helper from `Threading.h`.
> The tracing code (e.g. `if (!Requests.empty) { /*...*/}`) could be changed to log only when `*Deadline - steady_clock::now()` is positive.
> Will probably make the code simpler. WDYT?
Made Deadline a real type, and added a wait() overload without a condition.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D43648
More information about the cfe-commits
mailing list