ResultFlow

open class ResultFlow<T>

Will periodically execute the code block and emit the result in the results flow. IMPORTANT: You should call close() when you want the execution and flow to terminate.

Parameters

block

a function that will be periodically executed

dispatcher

the dispatcher that will be used to execute the code block the default is Dispatchers.Default

Inheritors

Functions

Link copied to clipboard
fun close()

This will terminate the code execution loop. IMPORTANT: Call this anytime you wish to discontinue the execution loop.