|
| | ViewJob (JobInput input) |
| | Prepares a job.
|
| bool | step (Deadline deadline, ::core::async::StopToken const &stop) |
| | Runs until done, the deadline, or a stop request.
|
| void | onPhase (std::function< void(std::size_t, std::size_t)> listener) |
| | Sets a receiver of (phases done, total) after each phase ends, on the thread that runs the step.
|
| std::pair< std::size_t, std::size_t > | progress () const noexcept |
| | Phases done and total, for a progress sink.
|
| bool | done () const noexcept |
| | Whether every phase has run.
|
| std::optional< std::string > const & | failure () const noexcept |
| | Why the job failed: the message of the exception that ended it.
|
| JobInput const & | input () const noexcept |
| | What the job reads.
|
| JobResult | takeResult () |
| | Moves the result out. Valid once done(); the input stays readable.
|
One recomputation of a view, runnable in steps.
Phases: build missing keys (or patch the keys of dirty rows), then either repair the previous order, or filter and sort, then diff against the previous view. step returns at a deadline or a stop request and resumes where it stopped.
Definition at line 283 of file engine.hpp.
| bool morph::table::detail::ViewJob::step |
( |
Deadline | deadline, |
|
|
::core::async::StopToken const & | stop ) |
|
inline |
Runs until done, the deadline, or a stop request.
An exception from an injected service (a collator, date parser or comparator) ends the job: it is done, with failure() set.
- Parameters
-
| deadline | When to yield. |
| stop | A stop request ends the step. |
- Returns
- true when the job is done.
Definition at line 299 of file engine.hpp.