[PATCH] D52420: [clangd] Fix crash if pending computations were active on exit

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 24 09:42:58 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: clangd/ClangdLSPServer.cpp:483
+  // Destroy ClangdServer to ensure all worker threads finish.
+  Server.reset();
 
----------------
ioeric wrote:
> This woudn't work if `run()` is called multiple times. Maybe create a `Server` in each `run()`? 
run() asserts it's never called multiple times, so we don't break the contract.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D52420





More information about the cfe-commits mailing list