clang-tools  14.0.0git
Classes | Namespaces | Functions
Threading.h File Reference
#include "support/Context.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/ADT/Twine.h"
#include <atomic>
#include <cassert>
#include <condition_variable>
#include <future>
#include <memory>
#include <mutex>
#include <thread>
#include <vector>
Include dependency graph for Threading.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  clang::clangd::Notification
 A threadsafe flag that is initially clear. More...
 
class  clang::clangd::Semaphore
 Limits the number of threads that can acquire the lock at the same time. More...
 
class  clang::clangd::Deadline
 A point in time we can wait for. More...
 
class  clang::clangd::AsyncTaskRunner
 Runs tasks on separate (detached) threads and wait for all tasks to finish. More...
 
class  clang::clangd::Memoize< Container >
 Memoize is a cache to store and reuse computation results based on a key. More...
 
class  clang::clangd::PeriodicThrottler
 Used to guard an operation that should run at most every N seconds. More...
 

Namespaces

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

Functions

Deadline clang::clangd::timeoutSeconds (llvm::Optional< double > Seconds)
 Makes a deadline from a timeout in seconds. None means wait forever. More...
 
void clang::clangd::wait (std::unique_lock< std::mutex > &Lock, std::condition_variable &CV, Deadline D)
 Wait once on CV for the specified duration. More...
 
template<typename Func >
LLVM_NODISCARD bool clang::clangd::wait (std::unique_lock< std::mutex > &Lock, std::condition_variable &CV, Deadline D, Func F)
 Waits on a condition variable until F() is true or D expires. More...
 
template<typename T >
std::future< T > clang::clangd::runAsync (llvm::unique_function< T()> Action)
 Runs Action asynchronously with a new std::thread. More...