43#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_SHUTDOWN_H
44#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_SUPPORT_SHUTDOWN_H
69template <typename Fun, typename Ret = decltype(std::declval<Fun>()())>
71 const std::enable_if_t<true, Ret> &Fail,
79 }
while (Res == Fail && errno == EINTR);
Ret retryAfterSignalUnlessShutdown(const std::enable_if_t< true, Ret > &Fail, const Fun &F)
Retry an operation if it gets interrupted by a signal.
void requestShutdown()
Sets a flag to indicate that clangd was sent a shutdown signal, and the transport loop should exit at...
bool shutdownRequested()
Checks whether requestShutdown() was called.
void abortAfterTimeout(std::chrono::seconds Timeout)
Causes this process to crash if still running after Timeout.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//