Extensions for kotlinx.coroutines.Job
fun Job.launchOnCancellation( Launch a coroutine with block body when the parent job is cancelled or a returned deferred is cancelled. It is important to complete or cancel returned deferred otherwise the parent job will be unable to complete successfully. |