Method: Xunch::FiberRedisPool#with

Defined in:
lib/xunch/connection/fiber_redis_pool.rb

#withObject



19
20
21
22
23
24
25
26
27
# File 'lib/xunch/connection/fiber_redis_pool.rb', line 19

def with
  f = Fiber.current
  begin
    conn = checkout_redis(f)
    yield conn
  ensure
    checkin_redis(f) 
  end
end