1 /* 2 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 package kotlinx.coroutines.reactive 6 7 import kotlinx.coroutines.InternalCoroutinesApi 8 import org.reactivestreams.Publisher 9 import kotlin.coroutines.CoroutineContext 10 11 /** @suppress */ 12 @InternalCoroutinesApi 13 public interface ContextInjector { 14 /** 15 * Injects `ReactorContext` element from the given context into the `SubscriberContext` of the publisher. 16 * This API used as an indirection layer between `reactive` and `reactor` modules. 17 */ injectCoroutineContextnull18 public fun <T> injectCoroutineContext(publisher: Publisher<T>, coroutineContext: CoroutineContext): Publisher<T> 19 } 20