[PATCH] D52004: [clangd] Allow all LSP methods to signal cancellation via $/cancelRequest
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 12 14:11:59 PDT 2018
sammccall created this revision.
sammccall added reviewers: ilya-biryukov, kadircet.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric.
The cancelable scopes are managed by JSONRPCDispatcher so that all Handlers
run in cancelable contexts.
(Previously ClangdServer did this, for code completion only).
Cancellation request processing is therefore also in JSONRPCDispatcher.
(Previously it was in ClangdLSPServer).
This doesn't actually make any new commands *respect* cancellation - they'd
need to check isCancelled() and bail out. But it opens the door to doing
this incrementally, and putting such logic in common machinery like TUScheduler.
I also rewrote the ClangdServer class/threading comments because I wanted to
add to it and I got carried away.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D52004
Files:
clangd/ClangdLSPServer.cpp
clangd/ClangdLSPServer.h
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/JSONRPCDispatcher.cpp
clangd/JSONRPCDispatcher.h
clangd/Protocol.cpp
clangd/Protocol.h
clangd/ProtocolHandlers.cpp
clangd/ProtocolHandlers.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52004.165150.patch
Type: text/x-patch
Size: 17554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180912/3abe50df/attachment-0001.bin>
More information about the cfe-commits
mailing list