clang-tools 19.0.0git
Classes | Namespaces | Typedefs | Functions
Cancellation.h File Reference
#include "support/Context.h"
#include "llvm/Support/Error.h"
#include <functional>
#include <system_error>

Go to the source code of this file.

Classes

class  clang::clangd::CancelledError
 Conventional error when no result is returned due to cancellation. More...
 

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
namespace  clang::clangd
 

Typedefs

using clang::clangd::Canceler = std::function< void()>
 A canceller requests cancellation of a task, when called.
 

Functions

std::pair< Context, Canceler > clang::clangd::cancelableTask (int Reason=1)
 Defines a new task whose cancellation may be requested.
 
int clang::clangd::isCancelled (const Context &Ctx=Context::current())
 If the current context is within a cancelled task, returns the reason.