LLVM
8.0.1
|
TaskQueue executes serialized work on a user-defined Thread Pool. More...
#include "llvm/Support/TaskQueue.h"
Public Member Functions | |
TaskQueue (ThreadPool &Scheduler) | |
Construct a task queue with no work. More... | |
~TaskQueue () | |
Blocking destructor: the queue will wait for all work to complete. More... | |
template<typename Callable > | |
std::future< typename std::result_of< Callable()>::type > | async (Callable &&C) |
Asynchronous submission of a task to the queue. More... | |
TaskQueue executes serialized work on a user-defined Thread Pool.
It guarantees that if task B is enqueued after task A, task B begins after task A completes and there is no overlap between the two.
Definition at line 35 of file TaskQueue.h.
|
inline |
Construct a task queue with no work.
Definition at line 70 of file TaskQueue.h.
|
inline |
Blocking destructor: the queue will wait for all work to complete.
Definition at line 73 of file TaskQueue.h.
|
inline |
Asynchronous submission of a task to the queue.
The returned future can be used to wait for the task (and all previous tasks that have not yet completed) to finish.
Definition at line 82 of file TaskQueue.h.
References C, F(), llvm::Lock, and Scheduler.