cancelChildren

fun Job.cancelChildren(cause: Throwable? = null): Unit (source)

Cancels all children jobs of this coroutine with the given cause using Job.cancel for all of them. Unlike Job.cancel on this job as a whole, the state of this job itself is not affected.