“parent context” is the name we use to name the context that would be inherited by the child (where child adds it own job to). Indeed, using an additional context parameter in launch we add to it, so with different context parameter values the resulting parent contexts are going to be different. It does not make much of a difference in practice, since parent-child relation is based only on aJob in the context and all the other elements in the context (dispatcher, name, etc) are auxilarily for that purpose. In both of your examples, the parent Job for both coroutines is the same, even though they can be launched in different parent contexts.

Written by

Project Lead for the Kotlin Programming Language @JetBrains

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store