Package-level declarations

Types

Link copied to clipboard

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

Captures calls to report within block and reports them as a Flow.

Link copied to clipboard

Captures calls to report within the given flow and reports them as a new Flow.

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
suspend fun report(progress: Progress)

Reports progress to the progress reporter stored in the currentCoroutineContext.

Link copied to clipboard
suspend fun reportProgress(onProgress: (Progress) -> Unit, block: suspend () -> Unit)

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.