function useAsync
source · line 16public
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.
parameter block
source · line 16public
block: suspend (R) -> T
parameter receiver
source · line 16public
R
type parameter R
source · line 16public
R : AsyncCloseable
Extensions
public suspend fun <R : AsyncCloseable, T> R.useAsync(block: suspend (R) -> T): T· scoop:scoop.asyncio:0.1.0
type parameter T
source · line 16public
T