W3cubDocs

/Kotlin

intercepted

Platform and version requirements: JVM (1.3), JS (1.3), Native (1.3)
fun <T> Continuation<T>.intercepted(): Continuation<T>

Intercepts this continuation with ContinuationInterceptor.

This function shall be used on the immediate result of createCoroutineUnintercepted or suspendCoroutineUninterceptedOrReturn, in which case it checks for ContinuationInterceptor in the continuation's context, invokes ContinuationInterceptor.interceptContinuation, caches and returns the result.

If this function is invoked on other Continuation instances it returns this continuation unchanged.

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines.intrinsics/intercepted.html