Method: Bundler::ConnectionPool::TimedStack#initialize

Defined in:
lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb

#initialize(size = 0, &block) ⇒ TimedStack

Creates a new pool with size connections that are created from the given block.



25
26
27
28
29
30
31
32
33
# File 'lib/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb', line 25

def initialize(size = 0, &block)
  @create_block = block
  @created = 0
  @que = []
  @max = size
  @mutex = Thread::Mutex.new
  @resource = Thread::ConditionVariable.new
  @shutdown_block = nil
end