tree: 00e61fc8ae9ab9daf8b4c4384b2f735a5e0b29fa [path history] [tgz]
  1. api/
  2. src/
  3. test/
  4. build.gradle.kts
  5. package.list
  6. README.md
reactive/kotlinx-coroutines-reactive/README.md

Module kotlinx-coroutines-reactive

Utilities for Reactive Streams.

Coroutine builders:

NameResultScopeDescription
publishPublisherProducerScopeCold reactive publisher that starts coroutine on subscribe

Integration with Flow:

NameResultDescription
Publisher.asFlowFlowConverts the given publisher to flow
Flow.asPublisherPublisherConverts the given flow to the TCK-compliant publisher

If these adapters are used along with kotlinx-coroutines-reactor in the classpath, then Reactor's Context is properly propagated as coroutine context element (ReactorContext) and vice versa.

Suspending extension functions and suspending iteration:

NameDescription
Publisher.awaitFirstReturns the first value from the given publisher
Publisher.awaitFirstOrDefaultReturns the first value from the given publisher or default
Publisher.awaitFirstOrElseReturns the first value from the given publisher or default from a function
Publisher.awaitFirstOrNullReturns the first value from the given publisher or null
Publisher.awaitLastReturns the last value from the given publisher
Publisher.awaitSingleReturns the single value from the given publisher

Package kotlinx.coroutines.reactive

Utilities for Reactive Streams.