Method: Xunch::FiberRedisPool#initialize
- Defined in:
- lib/xunch/connection/fiber_redis_pool.rb
#initialize(options) ⇒ FiberRedisPool
Returns a new instance of FiberRedisPool.
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/xunch/connection/fiber_redis_pool.rb', line 4 def initialize() @reserved = {} # map of in-progress connections @available = [] # pool of free connections @pending = [] # pending reservations (FIFO) @pool_timeout = [:pool_timeout] [:size].times do @available.push(redis = Redis.new()) end @closed = false end |