llir-opt
0.0.1
Low-Level Post-Link Optimiser for OCaml and C
|
#include <tools/llir-reducer/job_runner.h>
Public Member Functions | |
JobRunner (unsigned threadCount=1) | |
Initialises the job runner. | |
virtual | ~JobRunner () |
Cleanup on exit. | |
void | Execute (const Timeout &timeout) |
Run the pool. | |
Protected Member Functions | |
virtual std::optional< Task > | Request ()=0 |
virtual Result | Run (Task &&task)=0 |
Run the task on a separate thread. | |
virtual void | Post (Result &&result)=0 |
Post the result of a task. | |
Parallel job runner which requests jobs until one finishes.
|
protectedpure virtual |
Request a new task to run on a free thread. Short-running task that runs on the main thread.