Trait gaffer::Job [−][src]
pub trait Job: Send {
type Exclusion: PartialEq + Copy + Debug + Send;
type Priority: Ord + Copy + Send;
fn exclusion(&self) -> Self::Exclusion;
fn priority(&self) -> Self::Priority;
fn execute(self);
}
Expand description
A job which can be executed by the runner, with features to synchronise jobs that would interfere with each other and reduce the parallelisation of low priority jobs
Associated Types
Type used to check which jobs should not be allowed to run concurrently, see Job::exclusion()
. Use NoExclusion
for jobs which can always be run at the same time, see also ExclusionOption
.
Required methods
Used to check which jobs should not be allowed to run concurrently, if <Job::Exclusion as PartialEq>::eq(job1.exclusion(), job2.exclusion())
, then job1
and job2
can’t run at the same time.