WorkflowContext should provide extensions to subscribe to Flows #280
Description
Flow
is the brand-new, preview/experimental abstraction for cold streams built-in to the coroutines standard library (Kotlin/kotlinx.coroutines#254, not to be confused with square/flow, the Android backstack library). It is compatible with the Reactive Streams spec, and similar to libraries like RxJava or Reactor, but written in pure Kotlin using coroutines. Most notably, this means it can be used in common modules in multi-platform projects, uses declaration-site variance, and propagates nullibility across operators. And since it's included in the coroutines library, we can support it directly from the workflow-core
module without adding any dependencies.
While this library is still extremely unstable, and shouldn't be used in production, we can still build basic support for it as long as we keep the proper experimental annotations to discourage use in production (@FlowPreview
).
Activity