ktor-io / io.ktor.utils.io.pool / useBorrowed

useBorrowed

inline fun <T : Any, R> ObjectPool<T>.useBorrowed(block: (T) -> R): R
Deprecated: Use useInstance instead

Borrows and instance of T from the pool, invokes block with it and finally recycles it