reportProgress
Captures all calls to report in block and transmits them to onProgress.
Example
suspend fun main() {
// Function reference syntax
reportProgress(::println) {
// All 'report' calls in this block will be printed
someComplicatedTask()
}
// Lambda syntax
reportProgress({ println(it) }) {
someComplicatedTask()
}
}
Content copied to clipboard