Skip to content

Commit 46c18e3

Browse files
committed
Promote reactive adapters for Flow to stable API
1 parent bda9c79 commit 46c18e3

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

reactive/kotlinx-coroutines-reactive/src/ReactiveFlow.kt

-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ import kotlin.coroutines.*
2323
* If any of the resulting flow transformations fails, subscription is immediately cancelled and all in-flights elements
2424
* are discarded.
2525
*/
26-
@ExperimentalCoroutinesApi
2726
public fun <T : Any> Publisher<T>.asFlow(): Flow<T> =
2827
PublisherAsFlow(this, 1)
2928

3029
/**
3130
* Transforms the given flow to a spec-compliant [Publisher].
3231
*/
33-
@ExperimentalCoroutinesApi
3432
public fun <T : Any> Flow<T>.asPublisher(): Publisher<T> = FlowAsPublisher(this)
3533

3634
private class PublisherAsFlow<T : Any>(

reactive/kotlinx-coroutines-reactor/src/ReactorFlow.kt

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
package kotlinx.coroutines.reactor
66

7-
import kotlinx.coroutines.*
87
import kotlinx.coroutines.flow.Flow
98
import kotlinx.coroutines.flow.flowOn
109
import kotlinx.coroutines.reactive.FlowSubscription
@@ -15,7 +14,6 @@ import reactor.core.publisher.Flux
1514
* Converts the given flow to a cold flux.
1615
* The original flow is cancelled when the flux subscriber is disposed.
1716
*/
18-
@ExperimentalCoroutinesApi
1917
public fun <T: Any> Flow<T>.asFlux(): Flux<T> = FlowAsFlux(this)
2018

2119
private class FlowAsFlux<T : Any>(private val flow: Flow<T>) : Flux<T>() {

0 commit comments

Comments
 (0)