track

suspend fun <T> track(operation: suspend () -> T): T

Tracks a given operation.

Works also with unsafe operations that throw exceptions, as the tracking gets stopped. The exceptions are not swallowed though.

Parameters

operation

function to track