job

val CoroutineContext.job: Job

Retrieves the current Job instance from the given CoroutineContext or throws IllegalStateException if no job is present in the context.

This method is a short-cut for coroutineContext[Job]!! and should be used only when it is known in advance that the context does have instance of the job in it.

Sources

common source
Link copied to clipboard