diff options
author | Sam McCall <sam.mccall@gmail.com> | 2018-11-27 12:09:13 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2018-11-27 12:09:13 +0000 |
commit | 032f3e7fd8a12ceab800b0d9c3aca0f769f7b7cc (patch) | |
tree | 1e6ed4fea4e9c0e48af593956d38c5cfe50b232b /clang-tools-extra/clangd/tool/ClangdMain.cpp | |
parent | 60b7103ce8f692d9b836902dacccdb096168251e (diff) | |
download | bcm5719-llvm-032f3e7fd8a12ceab800b0d9c3aca0f769f7b7cc.tar.gz bcm5719-llvm-032f3e7fd8a12ceab800b0d9c3aca0f769f7b7cc.zip |
[clangd] Prevent thread starvation in tests on loaded systems.
Summary:
Background index deliberately runs low-priority, but for tests this may stop
them making progress.
Reviewers: kadircet
Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D54938
llvm-svn: 347655
Diffstat (limited to 'clang-tools-extra/clangd/tool/ClangdMain.cpp')
-rw-r--r-- | clang-tools-extra/clangd/tool/ClangdMain.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp index e349ee02751..ea542c1086b 100644 --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -254,6 +254,7 @@ int main(int argc, char *argv[]) { RunSynchronously = true; InputStyle = JSONStreamStyle::Delimited; PrettyPrint = true; + preventThreadStarvationInTests(); // Ensure background index makes progress. } if (Test || EnableTestScheme) { static URISchemeRegistry::Add<TestScheme> X( |