kotlin-flow-extensions / hu.akarnokd.kotlin.flow / BehaviorSubject / collectSafely

collectSafely

suspend fun collectSafely(collector: FlowCollector<T>): Unit

Accepts a collector and emits the latest (if available) value and any subsequent value received by this BehaviorSubject until the BehaviorSubject gets terminated.