SubscriptionAware

An entity that is aware of the number of its subscribers. Usually pro.respawn.flowmvi.api.PipelineContext

Inheritors

Properties

Link copied to clipboard
abstract val subscriberCount: StateFlow<Int>

The current number of subscribers of this entity.

Functions

Link copied to clipboard
inline suspend fun SubscriptionAware.doWhileSubscribed(stopDelay: Duration = 1.seconds, minSubscribers: Int = 1, crossinline action: suspend () -> Unit)

Runs action while this has at least minSubscribers subscribers. This function will suspend forever.