sammccall added a comment. Hmm, I wonder if we should have a Context.bind(function) -> function. I guess it runs into the usual thing of not being able to deduce a functor's signature, so you get an ugly templated return type..
================ Comment at: clang-tools-extra/clangd/unittests/LSPClient.cpp:120 + auto Req = std::move(Requests.front()); + // Leave request on the queue so that waiters can see it. Lock.unlock(); ---------------- which waiters? isn't it just this thread? ================ Comment at: clang-tools-extra/clangd/unittests/LSPClient.cpp:122 Lock.unlock(); - Action(H); + WithContext Ctx(std::move(Req.Ctx)); + Req.Action(H); ---------------- nit: scope WithContext to exclude taking the lock? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79302/new/ https://reviews.llvm.org/D79302 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits