<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Ilya,<div class=""><br class=""></div><div class="">Thank you for your feedback. I am not really rushing to rewrite ClangdScheduler I was mostly just curious about the possibility. </div><div class=""><br class=""></div><div class="">I am looking forward to your new threading implementation!</div><div class=""><br class=""></div><div class="">Jan</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 29, 2017, at 11:27 AM, Ilya Biryukov <<a href="mailto:ibiryukov@google.com" class="">ibiryukov@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Jan,<div class=""><br class=""></div><div class="">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).</div><div class="">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).</div><div class=""><br class=""></div><div class="">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 it does).</div><div class="">I'll also keep an eye on whether we would be able to reuse the ThreadPool in the new implementation.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Nov 29, 2017 at 11:33 AM, Jan Korous via cfe-dev <span dir="ltr" class=""><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">Hi all,<div class=""><br class=""></div><div class="">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 worthwhile.</div><div class=""><br class=""></div><div class=""><a href="https://github.com/llvm-mirror/clang-tools-extra/blob/master/clangd/ClangdServer.h" target="_blank" class="">https://github.com/llvm-<wbr class="">mirror/clang-tools-extra/blob/<wbr class="">master/clangd/ClangdServer.h</a></div><div class=""><a href="https://github.com/llvm-mirror/clang-tools-extra/blob/master/clangd/ClangdServer.h" target="_blank" class="">https://github.com/llvm-<wbr class="">mirror/clang-tools-extra/blob/<wbr class="">master/clangd/ClangdServer.cpp</a></div><div class=""><br class=""></div><div class=""><a href="https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Support/ThreadPool.h" target="_blank" class="">https://github.com/llvm-<wbr class="">mirror/llvm/blob/master/<wbr class="">include/llvm/Support/<wbr class="">ThreadPool.h</a></div><div class=""><a href="https://github.com/llvm-mirror/llvm/blob/master/lib/Support/ThreadPool.cpp" target="_blank" class="">https://github.com/llvm-<wbr class="">mirror/llvm/blob/master/lib/<wbr class="">Support/ThreadPool.cpp</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Jan</div></div><br class="">______________________________<wbr class="">_________________<br class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/cfe-dev</a><br class="">
<br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">Regards,</div><div class="">Ilya Biryukov</div></div></div></div></div>
</div>
</div></blockquote></div><br class=""></div></body></html>