Skip to content

Instantly share code, notes, and snippets.

@myungpyo
Created June 3, 2022 11:29
Show Gist options
  • Save myungpyo/1fae2f3d1c927c3b868b584de3fd57b4 to your computer and use it in GitHub Desktop.
Save myungpyo/1fae2f3d1c927c3b868b584de3fd57b4 to your computer and use it in GitHub Desktop.
internal class ChildHandleNode(
@JvmField val childJob: ChildJob
) : JobCancellingNode(), ChildHandle {
override val parent: Job get() = job
override fun invoke(cause: Throwable?) = childJob.parentCancelled(job)
override fun childCancelled(cause: Throwable): Boolean = job.childCancelled(cause)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment