Scoop API

scoop:scoop.asyncio:0.1.0

useAsync

function useAsync

source · line 16
public
public suspend fun <R : AsyncCloseable, T> R.useAsync(block: suspend (R) -> T): T

Extension receiver: R

Runs the block and always awaits resource close. If the body and cleanup both fail, ResourceUseException retains both errors.