SessionStatusFlow

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

Properties

Link copied to clipboard

A flow of Either resulting from periodic execution.

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.