[clangd] Make sure ReplyCallbacks are destroyed before RequestCancelersMutex
authorKadir Cetinkaya <kadircet@google.com>
Wed, 9 Oct 2019 13:59:31 +0000 (13:59 +0000)
committerKadir Cetinkaya <kadircet@google.com>
Wed, 9 Oct 2019 13:59:31 +0000 (13:59 +0000)
commit9a3a87d189753b7cea14d109c012ba37671e4adf
tree597609aa9623b4109b1d41d814d8f09ebf975494
parent2ae54aba03f24bf5047bd0fc4552c4bd7a09a39a
[clangd] Make sure ReplyCallbacks are destroyed before RequestCancelersMutex

Summary:
After rL374163, replycallbacks might have a cancellable context, which
will try to access RequestCancellers on destruction. See
http://45.33.8.238/mac/1245/step_7.txt for a sample failure.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits, thakis

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68702

llvm-svn: 374168
clang-tools-extra/clangd/ClangdLSPServer.cpp