Package-level declarations
Types
Link copied to clipboard
class CoroutineProgressReporter(reporter: ProgressReporter) : AbstractCoroutineContextElement, ProgressReporter
Captures progress information about the currently running task.
Link copied to clipboard
ProgressReporter implementation which stores the latest progress information in progress, a StateFlow.
Functions
Link copied to clipboard
Wraps this ProgressReporter into a CoroutineProgressReporter so it can be inserted in a CoroutineContext.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun <R> mapProgressTo(progressInterval: ClosedFloatingPointRange<Double>, block: suspend () -> R): R
Reduces progress events emitted in block to fit into progressInterval.
Link copied to clipboard
Reports progress to the progress reporter stored in the currentCoroutineContext.
Link copied to clipboard
Captures all calls to report in block and transmits them to onProgress.
Link copied to clipboard
suspend fun <R> transformProgress(createChildReporter: (ProgressReporter) -> ProgressReporter, block: suspend () -> R): R
Passes the current ProgressReporter to createChildReporter to create a new child reporter of the current coroutine, and adds it to block's context.