Introduction: Job and Awaiting Children

Learn about jobs and awaiting children and how to check the state of a job.

Jobs and awaiting children

In the “Structured Concurrency” lesson, we mentioned the following consequences of the parent-child relationship:

  • Children inherit context from their parents.
  • A parent suspends until all the children are finished.
  • When the parent is canceled, its child’s coroutines are also canceled.
  • When a child is destroyed, it also destroys the parent.

The fact that a child inherits its context from its parent is a basic part of a coroutine builder’s behavior.

Get hands-on with 1200+ tech skills courses.