Namespaces | |
| detail | |
Classes | |
| struct | CurrentJobrocket |
| struct | Job |
| struct | JobFunction |
| struct | JobFunctionBase |
| Abstract base class used to call the function regardless of arguments. More... | |
| class | JobGroup |
| class | JobPool |
| class | Scheduler |
| class | Worker |
Functions | |
| template<typename Fn , typename... Args> | |
| Job | make_unmanaged_job (Fn function, Args &&... args) |
Makes a new job on the stack without a JobPool More... | |
| void | startup (int32_t num_workers, int32_t num_main_threads) |
| void | shutdown () |
| JobPool * | current_job_pool () |
Gets a pointer to the currently active global JobPool More... | |
| Scheduler * | current_scheduler () |
Gets a pointer to the currently active global Scheduler More... | |
| void | run (Job *job) |
Takes a pre-allocated Job and schedules it to the currently active global scheduler. More... | |
| void | wait (const Job *job) |
| void | register_main_thread () |
| template<typename Fn , typename... Args> | |
| Job * | make_job (Fn function, Args &&... args) |
| Allocates a new job from the global pool with the job function and arguments given. More... | |
| template<typename Fn , typename... Args> | |
| void | make_job_and_wait (Fn function, Args &&... args) |
| Scheduler * jobrocket::current_scheduler | ( | ) |
Gets a pointer to the currently active global Scheduler
| Job* jobrocket::make_job | ( | Fn | function, |
| Args &&... | args | ||
| ) |
Allocates a new job from the global pool with the job function and arguments given.
| void jobrocket::make_job_and_wait | ( | Fn | function, |
| Args &&... | args | ||
| ) |
Allocates a new Job using the current global pool, schedules it and then makes the current thread wait until the jobs completion. This is analogous to calling:
| Job jobrocket::make_unmanaged_job | ( | Fn | function, |
| Args &&... | args | ||
| ) |
Makes a new job on the stack without a JobPool
| void jobrocket::register_main_thread | ( | ) |
| void jobrocket::run | ( | Job * | job | ) |
Takes a pre-allocated Job and schedules it to the currently active global scheduler.
| void jobrocket::shutdown | ( | ) |
Shuts down the global scheduler by waiting until all workers have completed the current job. All jobs sitting in worker queues are discarded
| void jobrocket::startup | ( | int32_t | num_workers = Scheduler::auto_thread_count, |
| int32_t | num_main_threads = Scheduler::auto_thread_count |
||
| ) |