[PATCH] D61724: [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::thread

2019-05-13 Thread Brennan Vincent via Phabricator via cfe-commits
umanwizard added a comment. Ignore me. I didn't read the previous discussion before commenting. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61724/new/ https://reviews.llvm.org/D61724 ___ cfe-commits mailing list cfe

[PATCH] D61724: [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::thread

2019-05-13 Thread Brennan Vincent via Phabricator via cfe-commits
umanwizard added inline comments. Comment at: clang-tools-extra/trunk/clangd/index/Background.cpp:164 stop(); - for (auto &Thread : ThreadPool) -Thread.join(); + ThreadPool.wait(); } This is already called in `~AsyncTaskRunner`. Repository: rL LLVM

[PATCH] D61724: [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::thread

2019-05-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360332: [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::thread (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D61724: [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::thread

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/index/Background.cpp:152 + for (unsigned I = 1; I <= ThreadPoolSize; ++I) { +ThreadPool.runAsync("background-worker-" + llvm::Twine(I), +[this] { run(); }); kad

[PATCH] D61724: [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::thread

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 198791. ilya-biryukov marked 4 inline comments as done. ilya-biryukov added a comment. - Count from 0. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61724/new/ https://reviews.llvm.org/D61724 Files: cl

[PATCH] D61724: [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::thread

2019-05-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang-tools-extra/clangd/index/Background.cpp:152 + for (unsigned I = 1; I <= ThreadPoolSize; ++I) { +ThreadPool.runAsync("background-worker-" + llv

[PATCH] D61724: [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::thread

2019-05-09 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. Herald added subscribers: jfb, arphaman, jkorous, MaskRay. Herald added a project: clang. To unify the way we create threads in clangd. This should simplify landing D50993 . Repository