[PATCH] D42573: [wip] The new threading implementation
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 26 03:26:13 PST 2018
ilya-biryukov added inline comments.
================
Comment at: clangd/ClangdServer.h:266
+
+ ParseInputs Inputs;
+ std::shared_ptr<CppFile> Resources;
----------------
These fields should probably be grouped into multiple groups:
- `Inputs` - capture the latest input. Can only be used on the main thread.
- `Resource->Preamble` - capture some built preamble (that's always available). Can be accessed on both the main thread and any of the worker threads.
- `LastRequestIsUpdate` and `LastUpdateCF` - capture the state of last update to allow cancelling it. Can be accessed only on the main thread.
- `Queue` and `Resources->AST` - capture the latest AST, Queue is used to schedule requests on the main thread, `Resources->AST` can only be accessed from actions on scheduled on the corresponding queue.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D42573
More information about the cfe-commits
mailing list