aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2018-09-13 11:47:48 +0000
committerSam McCall <sam.mccall@gmail.com>2018-09-13 11:47:48 +0000
commitc8758406b5685457992448fcca5b07c92c37b37b (patch)
tree0d35cd689112b8c1ff3fe086e28b1cb353a8e4b7 /llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp
parent778e0d24eebf6d29ef33fd61cc92724c0aead03e (diff)
downloadllvm-c8758406b5685457992448fcca5b07c92c37b37b.zip
llvm-c8758406b5685457992448fcca5b07c92c37b37b.tar.gz
llvm-c8758406b5685457992448fcca5b07c92c37b37b.tar.bz2
[clangd] Simplify cancellation public API
Summary: Task is no longer exposed: - task cancellation is hidden as a std::function - task creation returns the new context directly - checking is via free function only, with no way to avoid the context lookup The implementation is essentially the same, but a bit terser as it's hidden. isCancelled() is now safe to use outside any task (it returns false). This will leave us free to sprinkle cancellation in e.g. TUScheduler without needing elaborate test setup, and lets callers that don't cancel "just work". Updated the docs to describe the new expected use pattern. One thing I noticed: there's nothing async-specific about the cancellation. Async tasks can be cancelled from any thread (typically the one that created them), sync tasks can be cancelled from any *other* thread in the same way. So the docs now refer to "long-running" tasks instead of async ones. Updated usage in code complete, without any structural changes. I didn't update all the names of the helpers in ClangdLSPServer (these will likely be moved to JSONRPCDispatcher anyway). Reviewers: ilya-biryukov, kadircet Subscribers: ioeric, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D51996 llvm-svn: 342130
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFixFunctionBitcasts.cpp')
0 files changed, 0 insertions, 0 deletions