cancel

fun CoroutineContext.cancel(
    cause: CancellationException? = null
): Unit
(source)

Cancels Job of this context with an optional cancellation cause. See Job.cancel for details.