Class AnalysisJobDriver<T>
- Namespace
- SurvivorsMaker.Editor
- Assembly
- SurvivorsMaker.Editor.dll
Advances an IAnalysisJob<TResult> from EditorApplication.update in time slices so the editor stays responsive. Cancel asks the job to stop; the partial result is delivered with cancelled = true.
public sealed class AnalysisJobDriver<T> : IMakerJobProgress
Type Parameters
T
- Inheritance
-
AnalysisJobDriver<T>
- Implements
- Inherited Members
Constructors
AnalysisJobDriver()
public AnalysisJobDriver()
Fields
BudgetMilliseconds
Milliseconds of work per editor update.
public double BudgetMilliseconds
Field Value
Properties
Label
public string Label { get; }
Property Value
Progress
public float Progress { get; }
Property Value
Running
public bool Running { get; }
Property Value
Methods
Cancel()
public void Cancel()
RunToEnd(int)
Runs the whole job synchronously (bounded by maxSlices).
public void RunToEnd(int maxSlices = 100000)
Parameters
maxSlicesint
Start(IAnalysisJob<T>, string, Action<T, bool>, Action<Exception>)
public void Start(IAnalysisJob<T> job, string label, Action<T, bool> done, Action<Exception> failed)
Parameters
StepOnce(double)
Runs one slice now; true when the job finished (tests and synchronous callers).
public bool StepOnce(double budgetMilliseconds)
Parameters
budgetMillisecondsdouble
Returns
Stop()
Detaches without callbacks (window closed). The job is cancelled.
public void Stop()