flush

suspend fun flush(): Result<Unit>(source)

Writes the budget's exact counts to its store. Call it before close for the exact final write of a budget with a persistent store; it also works after close.

Return

success, or why the write failed; CallBudget.Unlimited succeeds.

Throws

kotlinx.coroutines.CancellationException

if the caller is cancelled.

if the budget's store throws one.