useConnection

fun <T> useConnection(block: (Jedis) -> T): T

Obtains a Jedis instance from the pool, executes block, and closes the connection at the end.