diff options
author | SokolovaMaria <marysok17@gmail.com> | 2019-08-09 17:35:14 +0300 |
---|---|---|
committer | Vsevolod Tolstopyatov <qwwdfsad@gmail.com> | 2019-08-09 17:35:14 +0300 |
commit | 1dcfd972db7853b551f5f6c636c9308876a562a6 (patch) | |
tree | f16f640bbdb53ed490208d10c4b825994f4f9b84 /reactive/kotlinx-coroutines-rx2/src/RxConvert.kt | |
parent | c7e9b561e4d570150528bde601b17463627de329 (diff) | |
download | platform_external_kotlinx.coroutines-1dcfd972db7853b551f5f6c636c9308876a562a6.tar.gz platform_external_kotlinx.coroutines-1dcfd972db7853b551f5f6c636c9308876a562a6.tar.bz2 platform_external_kotlinx.coroutines-1dcfd972db7853b551f5f6c636c9308876a562a6.zip |
Coroutine context propagation for Reactor to coroutines API migration (#1377)
* Propagation of the coroutine context of await calls into
Mono/Flux builder
* Publisher.asFlow propagates coroutine context from `collect`
call to the Publisher
* Flow.asFlux transform
* Optimized FlowSubscription
* kotlinx.coroutines.reactor.flow package is replaced with kotlinx.coroutines.reactor
Fixes #284
Diffstat (limited to 'reactive/kotlinx-coroutines-rx2/src/RxConvert.kt')
-rw-r--r-- | reactive/kotlinx-coroutines-rx2/src/RxConvert.kt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/reactive/kotlinx-coroutines-rx2/src/RxConvert.kt b/reactive/kotlinx-coroutines-rx2/src/RxConvert.kt index d5678de9..4b121271 100644 --- a/reactive/kotlinx-coroutines-rx2/src/RxConvert.kt +++ b/reactive/kotlinx-coroutines-rx2/src/RxConvert.kt @@ -8,8 +8,7 @@ import io.reactivex.* import kotlinx.coroutines.* import kotlinx.coroutines.channels.* import kotlinx.coroutines.flow.* -import kotlinx.coroutines.reactive.flow.* -import org.reactivestreams.* +import kotlinx.coroutines.reactive.* import kotlin.coroutines.* /** @@ -82,7 +81,7 @@ public fun <T : Any> ReceiveChannel<T>.asObservable(context: CoroutineContext): /** * Converts the given flow to a cold observable. - * The original flow is cancelled if the observable subscriber was disposed. + * The original flow is cancelled when the observable subscriber is disposed. */ @JvmName("from") @ExperimentalCoroutinesApi @@ -106,8 +105,8 @@ public fun <T: Any> Flow<T>.asObservable() : Observable<T> = Observable.create { } /** - * Converts the given flow to a cold observable. - * The original flow is cancelled if the flowable subscriber was disposed. + * Converts the given flow to a cold flowable. + * The original flow is cancelled when the flowable subscriber is disposed. */ @JvmName("from") @ExperimentalCoroutinesApi |