[cfe-dev] [clangd] ClangdScheduler & LLVM ThreadPool
Ilya Biryukov via cfe-dev
cfe-dev at lists.llvm.org
Wed Nov 29 03:27:24 PST 2017
Implementation used in clangd is a little specific to clangd, e.g. it
allows to add requests to both ends of the queue (to allow high-priority
ops like completion to be run before everything else).
We'll also be moving away from ThreadPool-like interface for
ClangdScheduler to better handle the resources we use and minimize unneeded
pauses (e.g., we wait() for ASTs to parse on the worker threads, keeping
workers from doing useful work).
I'm currently working on revamped threading implementation in clangd, so I
suggest waiting before it lands. (I'll make sure to update this thread when
I'll also keep an eye on whether we would be able to reuse the ThreadPool
in the new implementation.
On Wed, Nov 29, 2017 at 11:33 AM, Jan Korous via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Hi all,
> I am wondering about the fact that there is an implementation of
> asynchronous message queue (ClangdScheduler) in clangd which in principle
> is similar to what ThreadPool in LLVM Support does. I just wanted to ask
> what other people think about possibility of using ThreadPool in clangd as
> we could potentially spare some resources on maintaining only one version.
> It’s not a lot of code and those two implementations are not exactly the
> same so some one-time effort would be needed but it still might be
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev