children
Returns a sequence of this job’s children.
A job becomes a child of this job when it is constructed with this job in its
CoroutineContext or using an explicit parent
parameter.
A parent-child relation has the following effect:
- Cancellation of parent with cancel or its exceptional completion (failure) immediately cancels all its children.
- Parent cannot complete until all its children are complete. Parent waits for all its children to complete in completing or cancelling state.
- Uncaught exception in a child, by default, cancels parent. In particular, this applies to children created with launch coroutine builder. Note, that async and other future-like coroutine builders do not have uncaught exceptions by definition, since all their exceptions are caught and are encapsulated in their result.