use

suspend fun <R> use(block: suspend (TapClient) -> R): R(source)

Runs block with this client, then closes it. A block failure wins; a close failure after it is added as suppressed.