task¶
inline suspend fun <T> task(
message: () -> String,
values: SentierValues = SentierValues.Empty,
crossinline block: suspend CoroutineScope.() -> T
): T
Tracks the progress of block in a child Span.
This method implies the creation of a child coroutine scope, exactly like kotlinx.coroutines.coroutineScope. Therefore, one can use launch and other coroutine functions directly within a task.