A job of a controller: Job plus the queue.
Returned by Solo.job, Solo.enqueueJob and Solo.enqueue. The queue
belongs to the controller, so isQueued lives here and not on the handle
every job has. It is a ChildJob, so a body runs one as its child with
ctx.run, and it has no start of its own: the queue or the parent starts
it.
- Implemented types
-
- ChildJob<
T>
- ChildJob<
Properties
-
done
→ Future<
Outcome< T> > -
Completes with the outcome; never throws.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCancelled → bool
-
Whether the job has accepted a cancellation, even if the body still runs,
or has ended with one.
no setterinherited
- isChild → bool
-
Whether this job was adopted by a parent — through JobContext.run,
JobContext.runAll or JobContext.each.
no setterinherited
- isFinished → bool
-
Whether outcome is set.
no setterinherited
- isQueued → bool
-
Whether the job waits in the controller's queue.
no setter
- isRunning → bool
-
Whether the body is running or its children are still finishing.
no setterinherited
- key → Object?
-
The key given at creation.
no setterinherited
- level → int
-
Nesting depth: 0 for a root job,
parent.level + 1for a child.no setterinherited -
outcome
→ Outcome<
T> ? -
The outcome, or
nulluntil the job is finished.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
value
→ Future<
T> -
Completes with the returned value, or throws Cancelled with the
cancellation stack trace, or throws the body's error.
no setterinherited
Methods
-
cancel(
{CancelReason reason = const ManualCancelReason()}) → Future< void> -
Cancels the job with
reasonand waits for it to actually finish.inherited -
describe(
) → String -
The description given at creation, or an empty string.
inherited
-
ignoreFailure(
) → void -
Tells the core that nobody is interested in this job's failure.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
Creates a handle that finishes with the outcome of this job and cannot
reach it: one branch of a job continued in several.
inherited
-
then<
R> (FutureOr< R> onValue(JobContext ctx, T value), {Object? key, String describe()?, JobObserver? observer}) → Job<R> -
Creates a job that runs
onValueafter this job succeeds and cleans up.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
whenCancelled(
void callback(Cancelled)) → void Function() -
Registers
callbackfor cancellation and returns an unregister function.inherited -
whenFinished(
void callback(Outcome< T> outcome)) → void Function() -
Registers
callbackfor the end of the job and returns an unregister function.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited