children property

  1. @protected
List<JobBase<Object?>> get children

The children this job waits for, in the order they were adopted; read-only.

A copy taken at the call, not a view: a child that finishes after it is still in the list, and one adopted after it is not.

The way in is JobContextBase.startChild alone, which JobContext.run, JobContext.runAll and JobContext.each go through: it sets the parent, the level and the observer of the child, and nothing else may put a job on this list — the core would wait for a child it never adopted.

Implementation

@protected
List<JobBase<Object?>> get children => UnmodifiableListView(_childrenNow());