clang-tools 10.0.0

Classes | Public Member Functions | Static Public Member Functions | List of all members
clang::clangd::BackgroundQueue Class Reference

`#include <Background.h>`

## Classes
struct | Task
| A work item on the thread pool's queue. More...

## Public Member Functions
void | push (Task)
void | append (std::vector< Task >)
void | boost (llvm::StringRef Tag, unsigned NewPriority)
void | work (std::function< void()> OnIdle=nullptr)
void | stop ()
LLVM_NODISCARD bool | blockUntilIdleForTest (llvm::Optional< double > TimeoutSeconds)

## Static Public Member Functions
static void | preventThreadStarvationInTests ()

## Detailed Description

Definition at line 67 of file Background.h.

## Member Function Documentation

## ◆ append()

void clang::clangd::BackgroundQueue::append | ( | std::vector< Task > | Tasks | ) |

Definition at line 77 of file BackgroundQueue.cpp.

Referenced by clang::clangd::TEST().

## ◆ blockUntilIdleForTest()

bool clang::clangd::BackgroundQueue::blockUntilIdleForTest | ( | llvm::Optional< double > | TimeoutSeconds | ) |

Definition at line 107 of file BackgroundQueue.cpp.

References clang::clangd::timeoutSeconds(), and clang::clangd::wait().

## ◆ boost()

void clang::clangd::BackgroundQueue::boost | ( | llvm::StringRef | Tag,
|  | unsigned | NewPriority
| ) |  |

Definition at line 88 of file BackgroundQueue.cpp.

References Changes, and Tag.

Referenced by clang::clangd::BackgroundIndex::boostRelated().

## ◆ preventThreadStarvationInTests()

void clang::clangd::BackgroundQueue::preventThreadStarvationInTests | ( |  | ) |
| static

Definition at line 16 of file BackgroundQueue.cpp.

Referenced by clang::clangd::BackgroundIndexTest::BackgroundIndexTest().

## ◆ push()

void clang::clangd::BackgroundQueue::push | ( | Task | T | ) |

Definition at line 67 of file BackgroundQueue.cpp.

References clang::clangd::BackgroundQueue::Task::QueuePri, and clang::clangd::BackgroundQueue::Task::Tag.

Referenced by clang::clangd::TEST().

## ◆ stop()

void clang::clangd::BackgroundQueue::stop | ( |  | ) |

Definition at line 59 of file BackgroundQueue.cpp.

Referenced by clang::clangd::TEST().

## ◆ work()

void clang::clangd::BackgroundQueue::work | ( | std::function< void()> | OnIdle = `nullptr` | ) |

Definition at line 20 of file BackgroundQueue.cpp.

The documentation for this class was generated from the following files:

- Background.h
- BackgroundQueue.cpp