All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.kotlinx.kotlinx-coroutines-reactive.1.10.0.source-code.Convert.kt Maven / Gradle / Ivy

There is a newer version: 1.9.0
Show newest version
package kotlinx.coroutines.reactive

import kotlinx.coroutines.channels.*
import org.reactivestreams.*
import kotlin.coroutines.*

/** @suppress */
@Deprecated(message = "Deprecated in the favour of consumeAsFlow()",
    level = DeprecationLevel.HIDDEN, // Error in 1.4, HIDDEN in 1.6.0
    replaceWith = ReplaceWith("this.consumeAsFlow().asPublisher(context)", imports = ["kotlinx.coroutines.flow.consumeAsFlow"]))
public fun  ReceiveChannel.asPublisher(context: CoroutineContext = EmptyCoroutineContext): Publisher = publish(context) {
    for (t in this@asPublisher)
        send(t)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy