clang-tools 19.0.0git
Namespaces | Functions
Shutdown.h File Reference
#include <cerrno>
#include <chrono>
#include <type_traits>
#include <utility>

Go to the source code of this file.


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


void clang::clangd::abortAfterTimeout (std::chrono::seconds Timeout)
 Causes this process to crash if still running after Timeout.
void clang::clangd::requestShutdown ()
 Sets a flag to indicate that clangd was sent a shutdown signal, and the transport loop should exit at the next opportunity.
bool clang::clangd::shutdownRequested ()
 Checks whether requestShutdown() was called.
template<typename Fun , typename Ret = decltype(std::declval<Fun>()())>
Ret clang::clangd::retryAfterSignalUnlessShutdown (const std::enable_if_t< true, Ret > &Fail, const Fun &F)
 Retry an operation if it gets interrupted by a signal.