@hackerham I'm sorry. That was too complex example for a section that was supposed to introduce the concept of continuation interceptor. I rewrote that part of the "Continuation Interceptor" section:
https://github.com/Kotlin/kotlin-coroutines/blob/revision-3/kotlin-coroutines-informal.md#continuation-interceptor It now uses a simpler example that works just as well for the advertised purpose:
object Swing : AbstractCoroutineContextElement(ContinuationInterceptor), ContinuationInterceptor {
override fun <T> interceptContinuation(continuation: Continuation<T>): Continuation<T> =
SwingContinuation(continuation)
}