withSuspendingNonNullRedisPool
suspend fun <T> RedisClient.withSuspendingNonNullRedisPool(printStackTrace: Boolean = false, block: suspend (RedisClient) -> T): T?
Suspending variant of withNonNullRedisPool. Executes a suspending block with this RedisClient, returning null if the connection fails.
The connectivity ping runs on Dispatchers.IO; block runs in the caller's context, as in withSuspendingRedisPool.
Extension function on RedisClient.
Return
the result of block, or null on connection failure
Parameters
printStackTrace
if true, logs the full stack trace on connection failure
block
the suspending operation to execute with a guaranteed non-null client
Type Parameters
T
the return type of the block