Package-level declarations

Mechanisms and algorithms to report progress events from subtasks to their parent.

Overview

The main mechanism to report progress is via the ProgressReporter interface.

To transmit a progress reporter to subtasks, use the reduceToInterval function.

Types

Link copied to clipboard
fun interface ProgressReporter

SAM interface to communicate progress to a caller.

Functions

Link copied to clipboard

A ProgressReporter implementation that does nothing.

Link copied to clipboard

Creates a new reporter that applies transform to each progress event it receives.

Link copied to clipboard
fun ProgressReporter.reduceToInterval(interval: ClosedFloatingPointRange<Double>, treatDoneAs: Progress.Loading.Quantified = defaultDone, treatUnquantifiedAs: Progress.Loading.Quantified = defaultUnquantified): ProgressReporter

Creates a new reporter that proportionally confines progress events to interval.

fun ProgressReporter.reduceToInterval(min: Double, max: Double, treatDoneAs: Progress.Loading.Quantified = defaultDone, treatUnquantifiedAs: Progress.Loading.Quantified = defaultUnquantified): ProgressReporter

Creates a new reporter that proportionally confines progress events to the min..max range.