clang-tools 20.0.0git
|
#include <Background.h>
Classes | |
struct | Stats |
struct | Task |
A work item on the thread pool's queue. More... | |
Public Member Functions | |
BackgroundQueue (std::function< void(Stats)> OnProgress=nullptr) | |
void | push (Task) |
void | append (std::vector< Task >) |
void | boost (llvm::StringRef Tag, unsigned NewPriority) |
void | work (std::function< void()> OnIdle=nullptr) |
void | stop () |
bool | blockUntilIdleForTest (std::optional< double > TimeoutSeconds) |
Static Public Member Functions | |
static void | preventThreadStarvationInTests () |
Definition at line 69 of file Background.h.
|
inline |
Definition at line 93 of file Background.h.
void clang::clangd::BackgroundQueue::append | ( | std::vector< Task > | Tasks | ) |
Definition at line 102 of file BackgroundQueue.cpp.
References clang::clangd::BackgroundQueue::Stats::Enqueued.
Referenced by clang::clangd::TEST().
bool clang::clangd::BackgroundQueue::blockUntilIdleForTest | ( | std::optional< double > | TimeoutSeconds | ) |
Definition at line 136 of file BackgroundQueue.cpp.
References clang::clangd::BackgroundQueue::Stats::Active, clang::clangd::timeoutSeconds(), and clang::clangd::wait().
Referenced by clang::clangd::BackgroundIndex::blockUntilIdleForTest().
void clang::clangd::BackgroundQueue::boost | ( | llvm::StringRef | Tag, |
unsigned | NewPriority | ||
) |
Definition at line 117 of file BackgroundQueue.cpp.
Referenced by clang::clangd::BackgroundIndex::boostRelated(), and clang::clangd::TEST().
|
static |
Definition at line 18 of file BackgroundQueue.cpp.
References clang::clangd::PreventStarvation.
Referenced by clang::clangd::BackgroundIndexTest::BackgroundIndexTest(), and clang::clangd::clangdMain().
void clang::clangd::BackgroundQueue::push | ( | Task | T | ) |
Definition at line 89 of file BackgroundQueue.cpp.
References clang::clangd::BackgroundQueue::Stats::Enqueued.
Referenced by clang::clangd::BackgroundIndex::enqueue().
void clang::clangd::BackgroundQueue::stop | ( | ) |
Definition at line 68 of file BackgroundQueue.cpp.
Referenced by clang::clangd::BackgroundIndex::stop(), and clang::clangd::TEST().
void clang::clangd::BackgroundQueue::work | ( | std::function< void()> | OnIdle = nullptr | ) |
Definition at line 22 of file BackgroundQueue.cpp.
References clang::clangd::BackgroundQueue::Stats::Active, clang::clangd::BackgroundQueue::Stats::Completed, clang::clangd::BackgroundQueue::Stats::Enqueued, clang::clangd::BackgroundQueue::Stats::LastIdle, clang::clangd::PreventStarvation, clang::clangd::BackgroundQueue::Task::Run, and clang::clangd::BackgroundQueue::Task::ThreadPri.
Referenced by clang::clangd::TEST().