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.



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

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