|
ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
|
The worker pool. Safe to use from any thread. More...
#include <JobScheduler.hpp>
Public Member Functions | |
| JobScheduler (JobSchedulerOptions options={}, std::shared_ptr< IJobStore > store=nullptr) | |
| ~JobScheduler () | |
| Cancels every queued job (reported as cancelled), asks every running job to stop, and joins the workers. | |
| JobScheduler (const JobScheduler &)=delete | |
| JobScheduler & | operator= (const JobScheduler &)=delete |
| std::unique_ptr< JobQueue > | make_queue (std::string key, std::filesystem::path project, StageExecutor executor=default_stage_executor()) |
A new queue for project. | |
| std::size_t | workers () const noexcept |
| std::size_t | running_count () const |
| Jobs executing right now, across every queue. | |
| std::shared_ptr< IJobStore > | store () const |
| The store records are written to. | |
The worker pool. Safe to use from any thread.
Definition at line 56 of file JobScheduler.hpp.
|
explicit |
| store | Where job records go; nullptr = a fresh InMemoryJobStore. |
Referenced by JobScheduler(), and operator=().
| reusex::pipeline::JobScheduler::~JobScheduler | ( | ) |
Cancels every queued job (reported as cancelled), asks every running job to stop, and joins the workers.
Queues may outlive the scheduler; they then refuse new submissions.
|
delete |
References JobScheduler().
| std::unique_ptr< JobQueue > reusex::pipeline::JobScheduler::make_queue | ( | std::string | key, |
| std::filesystem::path | project, | ||
| StageExecutor | executor = default_stage_executor() ) |
A new queue for project.
key names it in the job store (ruxd uses the case id) and must be unique among this scheduler's live queues.
| std::invalid_argument | for an empty key, a key already in use, or an executor that is not callable. |
References reusex::pipeline::default_stage_executor().
|
delete |
References JobScheduler().
| std::size_t reusex::pipeline::JobScheduler::running_count | ( | ) | const |
Jobs executing right now, across every queue.
References running_count().
Referenced by running_count().
| std::shared_ptr< IJobStore > reusex::pipeline::JobScheduler::store | ( | ) | const |
|
noexcept |