aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-09-10 10:00:47 +0000
committerSam McCall <sam.mccall@gmail.com>2018-09-10 10:00:47 +0000
commitf469c64fef0f13fe92a4578526c1f2f5161b81ec (patch)
tree52e5eedd9129007919fa8cee1ae772db766e2dce /llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp
parentbf77ab7f0e4b3d03fca4319e8c8f596f623641b5 (diff)
downloadllvm-f469c64fef0f13fe92a4578526c1f2f5161b81ec.zip
llvm-f469c64fef0f13fe92a4578526c1f2f5161b81ec.tar.gz
llvm-f469c64fef0f13fe92a4578526c1f2f5161b81ec.tar.bz2
[clangd] Fix async index loading (from r341376).
Summary: This wasn't actually async (due to std::future destructor blocking). If it were, we would have clean shutdown issues if main returned and destroyed Placeholder before the thread is done with it. We could attempt to avoid any blocking by using shared_ptr or weak_ptr tricks so the thread can detect Placeholder's destruction, but there are other potential issues (e.g. loadIndex does tracing, and we'll destroy the tracer...) Instead, once LSPServer::run returns, we wait for the index to finish loading before exiting. Performance is not critical in this situation. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D51674 llvm-svn: 341797
Diffstat (limited to 'llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions