launch Molecule
fun <T> <ERROR CLASS>.launchMolecule(clock: RecompositionClock, body: () -> T): <ERROR CLASS><T>
Content copied to clipboard
Launch a coroutine into this CoroutineScope which will continually recompose body to produce a StateFlow stream of T values.
fun <T> <ERROR CLASS>.launchMolecule(clock: RecompositionClock, emitter: (T) -> Unit, body: () -> T)
Content copied to clipboard
Launch a coroutine into this CoroutineScope which will continually recompose body to invoke emitter with each returned T value.
launchMolecule's emitter is always free-running and will not respect backpressure. Use moleculeFlow to create a backpressure-capable flow.