aboutsummaryrefslogtreecommitdiff
path: root/reactive
diff options
context:
space:
mode:
authorVsevolod Tolstopyatov <qwwdfsad@gmail.com>2019-09-13 18:46:40 +0300
committerVsevolod Tolstopyatov <qwwdfsad@gmail.com>2019-09-25 16:56:16 +0300
commitb14afef68afb098209e7b112c96341425e5a7ec5 (patch)
tree6aaf1ae47d66a61f98e899ad5af343a845c58cc8 /reactive
parentf9bd46f8da6b53e0959e16d4d9a86b2690602b16 (diff)
downloadkotlinx.coroutines-b14afef68afb098209e7b112c96341425e5a7ec5.tar.gz
Promote reactive adapters for Flow to stable API
Diffstat (limited to 'reactive')
-rw-r--r--reactive/kotlinx-coroutines-reactive/src/ReactiveFlow.kt2
-rw-r--r--reactive/kotlinx-coroutines-reactor/src/ReactorFlow.kt2
2 files changed, 0 insertions, 4 deletions
diff --git a/reactive/kotlinx-coroutines-reactive/src/ReactiveFlow.kt b/reactive/kotlinx-coroutines-reactive/src/ReactiveFlow.kt
index 559068f5..1a3edc84 100644
--- a/reactive/kotlinx-coroutines-reactive/src/ReactiveFlow.kt
+++ b/reactive/kotlinx-coroutines-reactive/src/ReactiveFlow.kt
@@ -23,14 +23,12 @@ import kotlin.coroutines.*
* If any of the resulting flow transformations fails, subscription is immediately cancelled and all in-flights elements
* are discarded.
*/
-@ExperimentalCoroutinesApi
public fun <T : Any> Publisher<T>.asFlow(): Flow<T> =
PublisherAsFlow(this, 1)
/**
* Transforms the given flow to a spec-compliant [Publisher].
*/
-@ExperimentalCoroutinesApi
public fun <T : Any> Flow<T>.asPublisher(): Publisher<T> = FlowAsPublisher(this)
private class PublisherAsFlow<T : Any>(
diff --git a/reactive/kotlinx-coroutines-reactor/src/ReactorFlow.kt b/reactive/kotlinx-coroutines-reactor/src/ReactorFlow.kt
index 6b031ed4..c852c766 100644
--- a/reactive/kotlinx-coroutines-reactor/src/ReactorFlow.kt
+++ b/reactive/kotlinx-coroutines-reactor/src/ReactorFlow.kt
@@ -4,7 +4,6 @@
package kotlinx.coroutines.reactor
-import kotlinx.coroutines.*
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.reactive.FlowSubscription
@@ -15,7 +14,6 @@ import reactor.core.publisher.Flux
* Converts the given flow to a cold flux.
* The original flow is cancelled when the flux subscriber is disposed.
*/
-@ExperimentalCoroutinesApi
public fun <T: Any> Flow<T>.asFlux(): Flux<T> = FlowAsFlux(this)
private class FlowAsFlux<T : Any>(private val flow: Flow<T>) : Flux<T>() {