Class: Wayfarer::Networking::Pool

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Singleton
Defined in:
lib/wayfarer/networking/pool.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePool

Returns a new instance of Pool.



16
17
18
19
20
# File 'lib/wayfarer/networking/pool.rb', line 16

def initialize
  @pool = ConnectionPool.new(size: Wayfarer.config.network.pool_size,
                             timeout: Wayfarer.config.network.pool_timeout,
                             &method(:context))
end

Instance Attribute Details

#poolObject (readonly)

Returns the value of attribute pool.



14
15
16
# File 'lib/wayfarer/networking/pool.rb', line 14

def pool
  @pool
end

Instance Method Details

#freeObject



24
25
26
# File 'lib/wayfarer/networking/pool.rb', line 24

def free
  pool.shutdown(&:renew)
end