BlockingChain

interface BlockingChain<out T> : Chain<T>

A chain with blocking generator that could be used without suspension

Functions

Link copied to clipboard
open suspend override fun collect(collector: FlowCollector<T>)
Link copied to clipboard
abstract suspend override fun fork(): BlockingChain<T>

Create a copy of current chain state. Consuming resulting chain does not affect initial chain.

Link copied to clipboard
open suspend override fun next(): T

Generate next value, changing state if needed

Link copied to clipboard
abstract fun nextBlocking(): T

Get the next value without concurrency support. Not guaranteed to be thread safe.

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
inline fun <T : Any> BlockingChain<T>.nextBufferBlocking(size: Int): Buffer<T>

Sources

Link copied to clipboard